org.webmacro
Class RethrowableException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.webmacro.RethrowableException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ParseException, WebMacroException

public class RethrowableException
extends java.lang.Exception

RethrowableException A standard exception, inherited from Exception, 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

Constructor Summary
RethrowableException()
           
RethrowableException(java.lang.String s)
           
RethrowableException(java.lang.String s, java.lang.Throwable e)
           
 
Method Summary
 java.lang.Throwable getCaught()
          allow access to underlying exception
 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
 

Constructor Detail

RethrowableException

public RethrowableException()

RethrowableException

public RethrowableException(java.lang.String s)

RethrowableException

public RethrowableException(java.lang.String s,
                            java.lang.Throwable e)
Method Detail

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()
allow access to underlying exception