org.apache.cactus.util
Class ChainedException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.apache.cactus.util.ChainedException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ClientException, ParsingException

public class ChainedException
extends java.lang.Exception

A checked chained exception.

Version:
$Id: ChainedException.java,v 1.4 2003/05/26 11:45:22 cmlenz Exp $
Author:
Vincent Massol
See Also:
Serialized Form

Field Summary
protected  java.lang.Throwable originalException
          Original exception which caused this exception.
 
Constructor Summary
ChainedException(java.lang.String theMessage)
          Create a ChainedException and set the exception error message.
ChainedException(java.lang.String theMessage, java.lang.Throwable theException)
          Create a ChainedException, set the exception error message along with the exception object that caused this exception.
ChainedException(java.lang.Throwable theException)
          Create a ChaineException, and set exception object that caused this exception.
 
Method Summary
 void printStackTrace()
          Print the full stack trace, including the original exception.
 void printStackTrace(java.io.PrintStream thePs)
          Print the full stack trace, including the original exception.
 void printStackTrace(java.io.PrintWriter thePw)
          Print the full stack trace, including the original exception.
 
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
 

Field Detail

originalException

protected java.lang.Throwable originalException
Original exception which caused this exception.

Constructor Detail

ChainedException

public ChainedException(java.lang.String theMessage)
Create a ChainedException and set the exception error message.

Parameters:
theMessage - the message of the exception

ChainedException

public ChainedException(java.lang.String theMessage,
                        java.lang.Throwable theException)
Create a ChainedException, set the exception error message along with the exception object that caused this exception.

Parameters:
theMessage - the detail of the error message
theException - the original exception

ChainedException

public ChainedException(java.lang.Throwable theException)
Create a ChaineException, and set exception object that caused this exception. The message is set by default to be the one from the original exception.

Parameters:
theException - the original exception
Method Detail

printStackTrace

public void printStackTrace()
Print the full stack trace, including the original exception.


printStackTrace

public void printStackTrace(java.io.PrintStream thePs)
Print the full stack trace, including the original exception.

Parameters:
thePs - the byte stream in which to print the stack trace

printStackTrace

public void printStackTrace(java.io.PrintWriter thePw)
Print the full stack trace, including the original exception.

Parameters:
thePw - the character stream in which to print the stack trace


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.