public final class ExceptionUtils
extends java.lang.Object
| Constructor and Description |
|---|
ExceptionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getStackTrace(java.lang.StackTraceElement[] trace)
Returns String representation of the specified stack trace.
|
static java.lang.String |
getStackTrace(java.lang.Throwable throwable)
Returns the stack trace from a Throwable as a String.
|
public static java.lang.String getStackTrace(java.lang.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 java.lang.String getStackTrace(java.lang.StackTraceElement[] trace)
trace - stack trace