public final class ExceptionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getStackTrace(StackTraceElement[] trace)
Returns String representation of the specified stack trace.
|
static String |
getStackTrace(Throwable throwable)
Returns the stack trace from a Throwable as a String.
|
@NotNull public static String getStackTrace(@NotNull 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) method@NotNull public static String getStackTrace(@NotNull StackTraceElement[] trace)
trace - stack traceCopyright © 2020. All rights reserved.