Class Throwables
java.lang.Object
org.apache.logging.log4j.core.util.Throwables
Helps with Throwable objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Throwable
getRootCause
(Throwable throwable) Returns the deepest cause of the giventhrowable
.static void
Rethrows aThrowable
.private static <T extends Throwable>
voidtoStringList
(Throwable throwable) Converts a Throwable stack trace into a List of Strings.
-
Constructor Details
-
Throwables
private Throwables()
-
-
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
-
rethrow0
- Throws:
T extends Throwable
-