public class InvocationTargetException extends ReflectiveOperationException
getTargetException() still works.Method.invoke(Object,Object[]),
Constructor.newInstance(Object[]),
Serialized Form| Modifier | Constructor and Description |
|---|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause()
Returns the cause of this exception (which may be null).
|
Throwable |
getTargetException()
Get the wrapped (targeted) exception.
|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected InvocationTargetException()
public InvocationTargetException(Throwable targetException)
InvocationTargetException using another
exception.targetException - the exception to wrappublic InvocationTargetException(Throwable targetException, String err)
InvocationTargetException using another
exception and an error message.targetException - the exception to wraperr - an extra reason for the exception-throwingpublic Throwable getTargetException()
getCause()