Class Throwables
java.lang.Object
org.apache.logging.log4j.core.util.Throwables
Helps with Throwable objects.
- 
Method SummaryModifier and TypeMethodDescriptionstatic ThrowablegetRootCause(Throwable throwable) Extracts the deepest exception in the causal chain of the giventhrowable.static voidRethrows aThrowable.toStringList(Throwable throwable) Converts a Throwable stack trace into a List of Strings.
- 
Method Details- 
getRootCauseExtracts the deepest exception in the causal chain of the giventhrowable. Circular references will be handled and ignored.- Parameters:
- throwable- a throwable to navigate
- Returns:
- the deepest exception in the causal chain
 
- 
toStringListConverts a Throwable stack trace into a List of Strings.- Parameters:
- throwable- the Throwable
- Returns:
- a List of Strings
 
- 
rethrowRethrows aThrowable.- Parameters:
- t- the Throwable to throw.
- Since:
- 2.1
 
 
-