public class ExceptionUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String[] |
EMPTY_STRING_ARRAY
Copied from apache.commons.lang3 3.7 ArrayUtils class
|
| Constructor and Description |
|---|
ExceptionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String[] |
getStackFrames(Throwable throwable)
Captures the stack trace associated with the specified
Throwable object,
decomposing it into a list of stack frames. |
static String |
getStackTrace(Throwable throwable)
Gets the stack trace from a Throwable as a String.
|
public static final String[] EMPTY_STRING_ARRAY
An empty immutable String array.
public static String getStackTrace(Throwable throwable)
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 String[] getStackFrames(Throwable throwable)
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