| |
|
| java.lang.Object java.lang.Throwable java.lang.Exception java.lang.reflect.InvocationTargetException
InvocationTargetException | public class InvocationTargetException extends Exception (Code) | | InvocationTargetException is a checked exception that wraps
an exception thrown by an invoked method or constructor.
As of release 1.4, this exception has been retrofitted to conform to
the general purpose exception-chaining mechanism. The "target exception"
that is provided at construction time and accessed via the
InvocationTargetException.getTargetException() method is now known as the cause,
and may be accessed via the
Throwable.getCause method,
as well as the aforementioned "legacy method."
See Also: Method See Also: Constructor |
InvocationTargetException | protected InvocationTargetException()(Code) | | Constructs an
InvocationTargetException with
null as the target exception.
|
InvocationTargetException | public InvocationTargetException(Throwable target)(Code) | | Constructs a InvocationTargetException with a target exception.
Parameters: target - the target exception |
InvocationTargetException | public InvocationTargetException(Throwable target, String s)(Code) | | Constructs a InvocationTargetException with a target exception
and a detail message.
Parameters: target - the target exception Parameters: s - the detail message |
getCause | public Throwable getCause()(Code) | | Returns the cause of this exception (the thrown target exception,
which may be
null ).
the cause of this exception. since: 1.4 |
getTargetException | public Throwable getTargetException()(Code) | | Get the thrown target exception.
This method predates the general-purpose exception chaining facility.
The
Throwable.getCause method is now the preferred means of
obtaining this information.
the thrown target exception (cause of this exception). |
|
|
|