org.apache.taglibs.xtags.util
Class NestedRuntimeException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.apache.taglibs.xtags.util.NestedRuntimeException
All Implemented Interfaces:
java.io.Serializable

public class NestedRuntimeException
extends java.lang.RuntimeException

A RuntimeException which is nested to preserve stack traces. This class allows the following code to be written to convert a regular Exception into a RuntimeException without losing the stack trace.

    try {
        ...
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
 

Author:
James Strachan
See Also:
Serialized Form

Constructor Summary
NestedRuntimeException(java.lang.Exception nestedException)
           
NestedRuntimeException(java.lang.String message, java.lang.Exception nestedException)
           
 
Method Summary
 java.lang.Throwable fillInStackTrace()
           
 java.lang.Exception getNestedException()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream s)
           
 void printStackTrace(java.io.PrintWriter w)
           
 
Methods inherited from class java.lang.Throwable
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

NestedRuntimeException

public NestedRuntimeException(java.lang.Exception nestedException)

NestedRuntimeException

public NestedRuntimeException(java.lang.String message,
                              java.lang.Exception nestedException)
Method Detail

printStackTrace

public void printStackTrace(java.io.PrintStream s)

printStackTrace

public void printStackTrace(java.io.PrintWriter w)

printStackTrace

public void printStackTrace()

fillInStackTrace

public java.lang.Throwable fillInStackTrace()

getNestedException

public java.lang.Exception getNestedException()


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.