Package play.libs.exception
Class ExceptionUtils
- Object
-
- play.libs.exception.ExceptionUtils
-
public class ExceptionUtils extends Object
Copied from apache.commons.lang3 3.7
-
-
Field Summary
Fields Modifier and Type Field Description static String[]EMPTY_STRING_ARRAYCopied from apache.commons.lang3 3.7 ArrayUtils class
-
Constructor Summary
Constructors Constructor Description ExceptionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[]getStackFrames(Throwable throwable)Captures the stack trace associated with the specifiedThrowableobject, decomposing it into a list of stack frames.static StringgetStackTrace(Throwable throwable)Gets the stack trace from a Throwable as a String.
-
-
-
Field Detail
-
EMPTY_STRING_ARRAY
public static final String[] EMPTY_STRING_ARRAY
Copied from apache.commons.lang3 3.7 ArrayUtils classAn empty immutable
Stringarray.
-
-
Method Detail
-
getStackTrace
public static String getStackTrace(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.- Parameters:
throwable- theThrowableto be examined- Returns:
- the stack trace as generated by the exception's
printStackTrace(PrintWriter)method
-
getStackFrames
public static String[] getStackFrames(Throwable throwable)
Captures the stack trace associated with the specifiedThrowableobject, 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.- Parameters:
throwable- theThrowableto examine, may be null- Returns:
- an array of strings describing each stack frame, never null
-
-