|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.reflect.InvocationTargetException
InvocationTargetException is sort of a way to "wrap" whatever exception
comes up when a method or constructor is called via Reflection. As of
JDK 1.4, it was retrofitted to match the exception chaining of all other
exceptions, but getTargetException() still works.
Method.invoke(Object,Object[]),
Constructor.newInstance(Object[])| Constructor Summary | |
protected |
InvocationTargetException()
Construct an exception with null as the cause. |
|
InvocationTargetException(Throwable targetException)
Create an InvocationTargetException using another
exception. |
|
InvocationTargetException(Throwable targetException,
String err)
Create an InvocationTargetException using another
exception and an error message. |
| Method Summary | |
Throwable |
getCause()
Returns the cause of this exception (which may be null). |
Throwable |
getTargetException()
Get the wrapped (targeted) exception. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getMessage, initCause, printStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode |
| Constructor Detail |
protected InvocationTargetException()
public InvocationTargetException(Throwable targetException)
InvocationTargetException using another
exception.
targetException - the exception to wrap
public InvocationTargetException(Throwable targetException,
String err)
InvocationTargetException using another
exception and an error message.
targetException - the exception to wraperr - an extra reason for the exception-throwing| Method Detail |
public Throwable getTargetException()
getCause()public Throwable getCause()
getCause in class Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||