com.generationjava.lang
Class CascadedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.generationjava.lang.CascadedException
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- WritingException
public class CascadedException
- extends java.lang.Exception
An Exception which is being thrown on top of another
Throwable. That is, some code has caught an Exception
and wishes to throw a different Exception upwards
as a result. This class allows the original Exception
to still be accessible.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CascadedException
public CascadedException(java.lang.String s)
CascadedException
public CascadedException()
CascadedException
public CascadedException(java.lang.String s,
java.lang.Throwable t)
CascadedException
public CascadedException(java.lang.Throwable t)
getWrappedThrowable
public java.lang.Throwable getWrappedThrowable()
- Access the original exception.
- Returns:
- Throwable that was initially throw
setWrappedThrowable
public void setWrappedThrowable(java.lang.Throwable t)
- Reset the original exception.
- Parameters:
t
- Throwable to be wrapped
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