Package org.apache.tomcat.util
Class ExceptionUtils
java.lang.Object
org.apache.tomcat.util.ExceptionUtils
Utilities for handling Throwables and Exceptions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Checks whether the supplied Throwable is one that needs to be rethrown and swallows all others.static void
preload()
NO-OP method provided to enable simple pre-loading of this class.static Throwable
Checks whether the supplied Throwable is an instance ofInvocationTargetException
and returns the throwable that is wrapped by it, if there is any.
-
Constructor Details
-
ExceptionUtils
public ExceptionUtils()
-
-
Method Details
-
handleThrowable
Checks whether the supplied Throwable is one that needs to be rethrown and swallows all others.- Parameters:
t
- the Throwable to check
-
unwrapInvocationTargetException
Checks whether the supplied Throwable is an instance ofInvocationTargetException
and returns the throwable that is wrapped by it, if there is any.- Parameters:
t
- the Throwable to check- Returns:
t
ort.getCause()
-
preload
public static void preload()NO-OP method provided to enable simple pre-loading of this class. Since the class is used extensively in error handling, it is prudent to pre-load it to avoid any failure to load this class masking the true problem during error handling.
-