org.apache.cactus.util
Class ChainedRuntimeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.apache.cactus.util.ChainedRuntimeException
All Implemented Interfaces:
java.io.Serializable

public class ChainedRuntimeException
extends java.lang.RuntimeException

Represent an exception that should stop the running test. It is a runtime exception but it will be caught by JUnit so the application will not stop. The test will be reported as failed. It implements chaining.

Version:
$Id: ChainedRuntimeException.java,v 1.4 2001/09/14 20:20:13 pier Exp $
Author:
Vincent Massol
See Also:
Serialized Form

Constructor Summary
ChainedRuntimeException(java.lang.String theMessage)
          Create a TestException and set the exception error message.
ChainedRuntimeException(java.lang.String theMessage, java.lang.Throwable theException)
          Create a ChainedRuntimeException, set the exception error message along with the exception object that caused this exception.
ChainedRuntimeException(java.lang.Throwable theException)
          Create a ChainedRuntimeException, 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, getLocalizedMessage, getMessage, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChainedRuntimeException

public ChainedRuntimeException(java.lang.String theMessage)
Create a TestException and set the exception error message.
Parameters:
theMessage - the message of the exception

ChainedRuntimeException

public ChainedRuntimeException(java.lang.String theMessage,
                               java.lang.Throwable theException)
Create a ChainedRuntimeException, 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

ChainedRuntimeException

public ChainedRuntimeException(java.lang.Throwable theException)
Create a ChainedRuntimeException, 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.
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream thePs)
Print the full stack trace, including the original exception.
Overrides:
printStackTrace in class java.lang.Throwable
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.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
thePw - the character stream in which to print the stack trace


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