|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException com.anthonyeden.lib.ChainedRuntimeException
A chained runtime exception allows a parent exception to be specified
and accessible through the getNestedError()
method
and will appear in stack traces.
Constructor Summary | |
ChainedRuntimeException(java.lang.String message,
java.lang.Throwable nestedError)
Create a new ChainedRuntimeException. |
|
ChainedRuntimeException(java.lang.Throwable nestedError)
Create a new ChainedRuntimeException using the message of the nested error as the exception message. |
Method Summary | |
java.lang.Throwable |
getNestedError()
Return the parent exception. |
void |
printStackTrace()
Print the stack trace to System.err |
void |
printStackTrace(java.io.PrintStream out)
Print the stack trace. |
void |
printStackTrace(java.io.PrintWriter out)
Print the stack trace. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ChainedRuntimeException(java.lang.Throwable nestedError)
nestedError
- The nested errorpublic ChainedRuntimeException(java.lang.String message, java.lang.Throwable nestedError)
message
- The messagenestedError
- The parent exceptionMethod Detail |
public java.lang.Throwable getNestedError()
public void printStackTrace()
public void printStackTrace(java.io.PrintStream out)
out
- The output streampublic void printStackTrace(java.io.PrintWriter out)
out
- The output writer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |