public class StackTraceHelper
extends java.lang.Object
StackFrame objects.| Modifier and Type | Class and Description |
|---|---|
static class |
StackTraceHelper.StackFrameImpl
Represents a generic entry in a stack trace, be it originally from JS or Java.
|
| Constructor and Description |
|---|
StackTraceHelper() |
| Modifier and Type | Method and Description |
|---|---|
static StackFrame[] |
convertJavaStackTrace(java.lang.Throwable exception)
Convert a
Throwable to an array of StackFrames. |
static StackFrame[] |
convertJsStackTrace(ReadableArray stack)
Convert a JavaScript stack trace (see
parseErrorStack JS module) to an array of
StackFrames. |
static java.lang.String |
formatFrameSource(StackFrame frame)
Format a
StackFrame to a String (method name is not included). |
static java.lang.String |
formatStackTrace(java.lang.String title,
StackFrame[] stack)
Format an array of
StackFrames with the error title to a String. |
public static StackFrame[] convertJsStackTrace(@Nullable ReadableArray stack)
parseErrorStack JS module) to an array of
StackFrames.public static StackFrame[] convertJavaStackTrace(java.lang.Throwable exception)
Throwable to an array of StackFrames.public static java.lang.String formatFrameSource(StackFrame frame)
StackFrame to a String (method name is not included).public static java.lang.String formatStackTrace(java.lang.String title,
StackFrame[] stack)
StackFrames with the error title to a String.