|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.quartz.utils.ExceptionHelper
public class ExceptionHelper
Helper class for handling exception nesting, which is only supported in JDKs which are version 1.4 or later.
Sample usage:try { // Validate arguments } catch (Exception e) { Exception myException = new IllegalArgumentException("Doh!"); ExceptionHelper.setCause(myException, e); throw myException; }
Method Summary | |
---|---|
static java.lang.Throwable |
getCause(java.lang.Throwable exception)
Get the underlying cause Throwable of the given exception
if this JDK supports the Throwable#getCause() method. |
static java.lang.Throwable |
setCause(java.lang.Throwable exception,
java.lang.Throwable cause)
Set the given Throwable |
static boolean |
supportsNestedThrowable()
Get whether the Throwable hierarchy for this JDK supports initCause()/getCause(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Throwable setCause(java.lang.Throwable exception, java.lang.Throwable cause)
Throwable's cause if this JDK supports
the Throwable#initCause(Throwable)
method.
public static java.lang.Throwable getCause(java.lang.Throwable exception)
Throwable
of the given exception
if this JDK supports the Throwable#getCause()
method.
public static boolean supportsNestedThrowable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |