public class ExceptionUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
EMPTY_STRING_ARRAY
Copied from apache.commons.lang3 3.7 ArrayUtils class
An empty immutable
String array. |
| Constructor and Description |
|---|
ExceptionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
getStackFrames(java.lang.Throwable throwable)
Captures the stack trace associated with the specified
Throwable object, decomposing it into a list of
stack frames. |
static java.lang.String |
getStackTrace(java.lang.Throwable throwable)
Gets the stack trace from a Throwable as a String.
|
public static final java.lang.String[] EMPTY_STRING_ARRAY
String array.public static java.lang.String getStackTrace(java.lang.Throwable throwable)
Gets the stack trace from a Throwable as a String.
The result of this method vary by JDK version as this method
uses Throwable.printStackTrace(java.io.PrintWriter).
On JDK1.3 and earlier, the cause exception will not be shown
unless the specified throwable alters printStackTrace.
throwable - the Throwable to be examinedprintStackTrace(PrintWriter) methodpublic static java.lang.String[] getStackFrames(java.lang.Throwable throwable)
Captures the stack trace associated with the specified
Throwable object, decomposing it into a list of
stack frames.
The result of this method vary by JDK version as this method
uses Throwable.printStackTrace(java.io.PrintWriter).
On JDK1.3 and earlier, the cause exception will not be shown
unless the specified throwable alters printStackTrace.
throwable - the Throwable to examine, may be null