org.webmacro
Class RethrowableRuntimeException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--java.lang.RuntimeException
|
+--org.webmacro.RethrowableRuntimeException
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- WebMacroRuntimeException
- public class RethrowableRuntimeException
- extends java.lang.RuntimeException
RethrowableRuntimeException
A standard exception, inherited from RuntimeException, which also
includes a constructor of the form Exception(String, Exception)
which allows one exception to wrap another without throwing away
useful debugging information. The PrintStackTrace routine will
print the stack trace for both the original exception and the point
at which the exception was rethrown.
- Since:
- 0.96
- Author:
- Brian Goetz (Quiotix Corp)
- See Also:
- Serialized Form
Method Summary |
java.lang.Throwable |
getCaught()
Deprecated. you should use getCause instead |
java.lang.Throwable |
getCause()
Return the underlying exception provided at construction time
or null if none was provided. |
java.lang.Throwable |
getRootCause()
Return the original exception cause. |
void |
printStackTrace()
|
void |
printStackTrace(java.io.PrintStream ps)
|
void |
printStackTrace(java.io.PrintWriter pw)
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RethrowableRuntimeException
public RethrowableRuntimeException()
RethrowableRuntimeException
public RethrowableRuntimeException(java.lang.String s)
RethrowableRuntimeException
public RethrowableRuntimeException(java.lang.String s,
java.lang.Throwable e)
printStackTrace
public void printStackTrace()
- Overrides:
printStackTrace
in class java.lang.Throwable
printStackTrace
public void printStackTrace(java.io.PrintStream ps)
- Overrides:
printStackTrace
in class java.lang.Throwable
printStackTrace
public void printStackTrace(java.io.PrintWriter pw)
- Overrides:
printStackTrace
in class java.lang.Throwable
getCaught
public java.lang.Throwable getCaught()
- Deprecated. you should use
getCause
instead
- allow access to underlying exception
getCause
public java.lang.Throwable getCause()
- Return the underlying exception provided at construction time
or null if none was provided.
- Returns:
- underlying cause
- Since:
- 1.1
getRootCause
public java.lang.Throwable getRootCause()
- Return the original exception cause. This will recursively
extract the cause if cause is a subclass of
RethrowableException
.
- Returns:
- underlying root cause
- Since:
- 1.1