|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.waveset.util.ExceptionWrapper
An exception class that can wrap other exceptions.
Field Summary | |
static java.lang.String |
code_id
|
Constructor Summary | |
ExceptionWrapper()
Construct a ExceptionWrapper with no message or nested throwable. |
|
ExceptionWrapper(java.lang.String message)
Construct a new ExceptionWrapper with a detailed message. |
|
ExceptionWrapper(java.lang.String message,
java.lang.Throwable e)
Create a new ExceptionWrapper from an existing exception. |
|
ExceptionWrapper(java.lang.Throwable e)
Construct a new ExceptionWrapper wrapping an existing exception. |
Method Summary | |
void |
addException(java.lang.Throwable e)
Adds an Exception to the list of wrapped Exceptions. |
int |
clearExceptions()
Removes all wrapped Exceptions. |
static java.lang.String |
describeException(java.lang.Throwable e)
|
java.lang.String |
getAllMessages()
Return a string containing the exception class name and messages for all wrapped exceptions. |
java.lang.Throwable |
getException()
Returns the first embedded exception, if any. |
java.lang.Throwable |
getException(int n)
Returns the Nth embedded exception, if any. |
int |
getExceptionCount()
Returns the number of wrapped Exceptions. |
java.lang.String |
getMessage()
Return a detail message for this exception. |
boolean |
hasException()
Returns true if there are any wrapped Exceptions. |
void |
printStackTrace()
|
void |
printStackTrace(java.io.PrintStream str)
|
void |
printStackTrace(java.io.PrintWriter out)
|
int |
removeException(java.lang.Throwable e)
Removes an Exception to the list of wrapped Exceptions. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, 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 ExceptionWrapper()
public ExceptionWrapper(java.lang.String message)
public ExceptionWrapper(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 ExceptionWrapper(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 int getExceptionCount()
public boolean hasException()
public java.lang.Throwable getException()
public java.lang.Throwable getException(int n)
public void addException(java.lang.Throwable e)
public int removeException(java.lang.Throwable e)
public int clearExceptions()
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 getAllMessages()
I18N: There is English in here, be careful.
In current practice this should not be called, rendering of wrapped exceptions is now handled by WavesetException.
public static java.lang.String describeException(java.lang.Throwable e)
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 |