java.lang.reflect
Class InvocationTargetException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--java.lang.reflect.InvocationTargetException
public class
InvocationTargetExceptionextends
Exception 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.
Since:Authors:- John Keiser
- Tom Tromey <tromey@cygnus.com>
- Eric Blake <ebb9@email.byu.edu>
See Also:
InvocationTargetException
protected InvocationTargetException()
Construct an exception with null as the cause. The cause is initialized
to null.
InvocationTargetException
public InvocationTargetException(java.lang.Throwable targetException)
Create an InvocationTargetException
using another
exception.
Parameters:
InvocationTargetException
public InvocationTargetException(java.lang.Throwable targetException, java.lang.String err)
Create an InvocationTargetException
using another
exception and an error message.
Parameters:
getCause
public Throwable getCause()
Returns the cause of this exception (which may be null).
Since:Returns:
getTargetException
public Throwable getTargetException()
Get the wrapped (targeted) exception.
Returns:
See Also:
getTargetException()
still works.