org.fest.reflect.util
Class Throwables
java.lang.Object
org.fest.reflect.util.Throwables
public final class Throwables
- extends Object
Understands utility methods related to Throwable
s.
- Since:
- 1.2
- Author:
- Alex Ruiz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
targetOf
public static Throwable targetOf(Throwable t)
- Obtains the target of the given
Throwable
. If the Throwable
is a
InvocationTargetException
, this method will return the "target exception" (not the cause.)
For other Throwable
s, the same instance is returned unmodified.
- Parameters:
t
- the given Throwable
.
- Returns:
- the target exception, if applicable. Otherwise, this method returns the same
Throwable
passed
as argument.
Copyright © 2007-2010 FEST (Fixtures for Easy Software Testing). All Rights Reserved.