|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--org.openspml.util.ExceptionWrapper
An exception class that can wrap other exceptions. Used so we can
consistently use SpmlException
within this library, but
still convey information found in other exceptions.
SpmlException
, Serialized FormConstructor Summary | |
ExceptionWrapper()
Construct an empty exception wrapper. |
|
ExceptionWrapper(java.lang.String message)
Construct an exception wrapper with a detail message. |
|
ExceptionWrapper(java.lang.String message,
java.lang.Throwable t)
Create an exception wrapper from an existing exception but with a different detail message. |
|
ExceptionWrapper(java.lang.Throwable t)
Construct an exception wrapper with an existing exception. |
Method Summary | |
void |
addException(java.lang.Throwable t)
Adds another exception to the list of wrapped exceptions. |
void |
clearExceptions()
Removes all wrapped exceptions. |
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.util.List |
getExceptions()
Return the list of nested exceptions. |
java.lang.String |
getMessage()
Return a detail message for this exception. |
void |
printStackTrace()
Throwable overload to cause printing of the nested exception stack traces as well as our own. |
void |
printStackTrace(java.io.PrintStream str)
Throwable overload to cause printing of the nested exception stack traces as well as our own. |
void |
printStackTrace(java.io.PrintWriter out)
Throwable overload to cause printing of the nested exception stack traces as well as our own. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace,
getLocalizedMessage,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ExceptionWrapper()
public ExceptionWrapper(java.lang.String message)
message
- detail messagepublic ExceptionWrapper(java.lang.Throwable t)
The detail message for the throwable will become the default message for this wrapper.
t
- nested throwablepublic ExceptionWrapper(java.lang.String message, java.lang.Throwable t)
message
- detail messaget
- nested throwableMethod Detail |
public void addException(java.lang.Throwable t)
public void clearExceptions()
public java.util.List getExceptions()
public int getExceptionCount()
public java.lang.Throwable getException()
public java.lang.Throwable getException(int n)
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()
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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |