|
|||||||||
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.RuntimeException
java.lang.reflect.UndeclaredThrowableException
public class UndeclaredThrowableException
This exception class is thrown by a Proxy
instance if
the invoke
method of that instance's InvocationHandler attempts to throw an
exception that not declared by the throws clauses of all of the
interface methods that the proxy instance is implementing.
When thrown by Proxy, this class will always wrap a checked
exception, never Error
or RuntimeException
,
which are unchecked.
Proxy
,
InvocationHandler
,
Serialized FormConstructor Summary | |
---|---|
UndeclaredThrowableException(Throwable cause)
Wraps the given checked exception into a RuntimeException, with no detail message. |
|
UndeclaredThrowableException(Throwable cause,
String message)
Wraps the given checked exception into a RuntimeException, with the specified detail message. |
Method Summary | |
---|---|
Throwable |
getCause()
Returns the cause of this exception. |
Throwable |
getUndeclaredThrowable()
Returns the cause of this exception. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UndeclaredThrowableException(Throwable cause)
Throwable.initCause(Throwable)
will fail
on this instance.
cause
- the undeclared throwable that caused this exception,
may be nullpublic UndeclaredThrowableException(Throwable cause, String message)
Throwable.initCause(Throwable)
will
fail on this instance.
cause
- the undeclared throwable that caused this exception,
may be nullmessage
- the message, may be nullMethod Detail |
---|
public Throwable getUndeclaredThrowable()
Proxy
instance, it will be a non-null checked
exception. This method pre-dates exception chaining, and is now
simply a longer way to call getCause()
.
getCause()
public Throwable getCause()
Proxy
instance, it will be a non-null checked
exception.
getCause
in class Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |