|
||||||||||
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
com.waveset.util.RuntimeExceptionWrapper
For wrapping exceptions as a RuntimeException. Nice for those cases where you are calling an API which declares that it throws an exception which cannot happen in the current context. (Won't be needed anymore in JDK 1.4 since it's RuntimeException constructor takes an optional cause).
Field Summary | |
static java.lang.String |
code_id
|
Constructor Summary | |
RuntimeExceptionWrapper()
Construct a RuntimeExceptionWrapper with no message or nested throwable. |
|
RuntimeExceptionWrapper(java.lang.String message)
Construct a new RuntimeExceptionWrapper with a detailed message. |
|
RuntimeExceptionWrapper(java.lang.String message,
java.lang.Throwable e)
Create a new RuntimeExceptionWrapper from an existing exception. |
|
RuntimeExceptionWrapper(java.lang.Throwable e)
Construct a new RuntimeExceptionWrapper wrapping an existing exception. |
Method Summary | |
java.lang.Throwable |
getCause()
Returns the root exception. |
java.lang.String |
getLocalizedMessage()
Return a localized message for this exception. |
java.lang.String |
getMessage()
Return a detail message for this exception. |
void |
printStackTrace()
|
void |
printStackTrace(java.io.PrintStream str)
|
void |
printStackTrace(java.io.PrintWriter out)
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
Constructor Detail |
public RuntimeExceptionWrapper()
public RuntimeExceptionWrapper(java.lang.String message)
public RuntimeExceptionWrapper(java.lang.Throwable e)
The existing exception will be embedded in the new one, and its message will become the default message for the ExceptionWrapper.
public RuntimeExceptionWrapper(java.lang.String message, java.lang.Throwable e)
The existing exception will be embedded in the new one, but the new exception will have its own message.
Method Detail |
public java.lang.Throwable getCause()
public java.lang.String getMessage()
If there is a embedded exception, and if this exception has no detail message of its own, getMessage method will return the detail message from the first embedded exception.
public java.lang.String getLocalizedMessage()
If there is a embedded exception, uses the embedded exception's localized message. Othermise returns super.getLocalizedMessage.
public void printStackTrace()
public void printStackTrace(java.io.PrintStream str)
public void printStackTrace(java.io.PrintWriter out)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |