Package org.fest.reflect.util
Class Throwables
java.lang.Object
org.fest.reflect.util.Throwables
Understands utility methods related to
Throwable
s.- Since:
- 1.2
- Author:
- Alex Ruiz
-
Method Summary
-
Method Details
-
targetOf
Obtains the target of the given
. If theThrowable
Throwable
is a
, this method will return the "target exception" (not the cause.) For otherInvocationTargetException
Throwable
s, the same instance is returned unmodified.- Parameters:
t
- the givenThrowable
.- Returns:
- the target exception, if applicable. Otherwise, this method returns the same
Throwable
passed as argument.
-