Class Throwables
java.lang.Object
org.apache.logging.log4j.core.util.Throwables
Helps with Throwable objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Throwable
getRootCause
(Throwable throwable) Returns the deepest cause of the giventhrowable
.static void
Rethrows aThrowable
.toStringList
(Throwable throwable) Converts a Throwable stack trace into a List of Strings.
-
Method Details
-
getRootCause
Returns the deepest cause of the giventhrowable
.- Parameters:
throwable
- the throwable to navigate- Returns:
- the deepest throwable or the given throwable
-
toStringList
Converts a Throwable stack trace into a List of Strings.- Parameters:
throwable
- the Throwable- Returns:
- a List of Strings
-
rethrow
Rethrows aThrowable
.- Parameters:
t
- the Throwable to throw.- Since:
- 2.1
-