Top Description Constructors Methods
org.apache.tomcat.util

public Class ExceptionUtils

extends Object
Class Inheritance
Imports
java.lang.reflect.InvocationTargetException

Utilities for handling Throwables and Exceptions.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
handleThrowable(Throwable
the Throwable to check
t
)

Checks whether the supplied Throwable is one that needs to be rethrown and swallows all others.

public static void
preload()

NO-OP method provided to enable simple pre-loading of this class.

public static Throwable

Returns:

t or t.getCause()
unwrapInvocationTargetException
(Throwable
the Throwable to check
t
)

Checks whether the supplied Throwable is an instance of InvocationTargetException and returns the throwable that is wrapped by it, if there is any.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ExceptionUtilsback to summary
public ExceptionUtils()

Method Detail

handleThrowableback to summary
public static void handleThrowable(Throwable t)

Checks whether the supplied Throwable is one that needs to be rethrown and swallows all others.

Parameters
t:Throwable

the Throwable to check

preloadback to summary
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.

unwrapInvocationTargetExceptionback to summary
public static Throwable unwrapInvocationTargetException(Throwable t)

Checks whether the supplied Throwable is an instance of InvocationTargetException and returns the throwable that is wrapped by it, if there is any.

Parameters
t:Throwable

the Throwable to check

Returns:Throwable

t or t.getCause()