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.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COLUMN_KEY |
static java.lang.String |
LINE_NUMBER_KEY |
| 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(org.json.JSONArray stack)
Convert a JavaScript stack trace (see
parseErrorStack JS module) 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 StackFrame[] |
convertJsStackTrace(java.lang.String stack)
Convert a JavaScript stack trace 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 final java.lang.String COLUMN_KEY
public static final java.lang.String LINE_NUMBER_KEY
public static StackFrame[] convertJsStackTrace(ReadableArray stack)
parseErrorStack JS module) to an array of StackFrames.public static StackFrame[] convertJsStackTrace(org.json.JSONArray stack)
parseErrorStack JS module) to an array of StackFrames.public static StackFrame[] convertJsStackTrace(java.lang.String stack)
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.