Example usage for Java org.apache.commons.lang3.exception ExceptionUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
Throwable | getCause(final Throwable throwable) Introspects the The method searches for methods with specific names that return a |
String | getMessage(final Throwable th) Gets a short message summarising the exception. |
Throwable | getRootCause(final 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(final Throwable th) Gets a short message summarising the root cause exception. |
String[] | getRootCauseStackTrace(final 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(final 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(final 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 . |
String | getStackTrace(final 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(final 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(final Throwable throwable) Returns the list of A throwable without cause will return an array containing one element - the input throwable. |
int | indexOfThrowable(final Throwable throwable, final Class> clazz) Returns the (zero based) index of the first |
int | indexOfType(final Throwable throwable, final Class> type) Returns the (zero based) index of the first |
void | printRootCauseStackTrace(final 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(final Throwable throwable, final 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(final Throwable throwable, final 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. |