Example usage for Java org.apache.commons.lang.exception ExceptionUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
Throwable | getCause(Throwable throwable) Introspects the The method searches for methods with specific names that return a |
String | getFullStackTrace(Throwable throwable) A way to get the entire nested stack-trace of an throwable. The result of this method is highly dependent on the JDK version and whether the exceptions override printStackTrace or not. |
String | getMessage(Throwable th) Gets a short message summarising the exception. |
Throwable | getRootCause(Throwable throwable) Introspects the This method walks through the exception chain to the last element, "root" of the tree, using #getCause(Throwable) , and returns that exception. From version 2.2, this method handles recursive cause structures that might otherwise cause infinite loops. |
String | getRootCauseMessage(Throwable th) Gets a short message summarising the root cause exception. |
String[] | getRootCauseStackTrace(Throwable throwable) Creates a compact stack trace for the root cause of the supplied The output of this method is consistent across JDK versions. |
String[] | getStackFrames(Throwable throwable) Captures the stack trace associated with the specified The result of this method vary by JDK version as this method uses Throwable#printStackTrace(java.io.PrintWriter) . |
String[] | getStackFrames(String stackTrace) Returns an array where each element is a line from the argument. The end of line is determined by the value of SystemUtils#LINE_SEPARATOR . Functionality shared between the |
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) . |
int | getThrowableCount(Throwable throwable) Counts the number of A throwable without cause will return |
List | getThrowableList(Throwable throwable) Returns the list of A throwable without cause will return a list containing one element - the input throwable. |
Throwable[] | getThrowables(Throwable throwable) Returns the list of A throwable without cause will return an array containing one element - the input throwable. |
int | indexOfThrowable(Throwable throwable, Class clazz) Returns the (zero based) index of the first |
int | indexOfType(Throwable throwable, Class type) Returns the (zero based) index of the first |
void | printRootCauseStackTrace(Throwable throwable) Prints a compact stack trace for the root cause of a throwable to The compact stack trace starts with the root cause and prints stack frames up to the place where it was caught and wrapped. |
void | printRootCauseStackTrace(Throwable throwable, PrintStream stream) Prints a compact stack trace for the root cause of a throwable. The compact stack trace starts with the root cause and prints stack frames up to the place where it was caught and wrapped. |
void | printRootCauseStackTrace(Throwable throwable, PrintWriter writer) Prints a compact stack trace for the root cause of a throwable. The compact stack trace starts with the root cause and prints stack frames up to the place where it was caught and wrapped. |