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:
Serializable
Known Advisors:
LogAspect

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.1 2002/03/01 00:43:47 vmassol Exp $
Author:
Vincent Massol

Constructor Summary
ChainedRuntimeException(String theMessage)
          Create a TestException and set the exception error message.
ChainedRuntimeException(String theMessage, Throwable theException)
          Create a ChainedRuntimeException, set the exception error message along with the exception object that caused this exception.
ChainedRuntimeException(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(PrintStream thePs)
          Print the full stack trace, including the original exception.
          Affected by: LogAspect
 void printStackTrace(PrintWriter thePw)
          Print the full stack trace, including the original exception.
          Affected by: LogAspect
 
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(String theMessage)
Create a TestException and set the exception error message.
Parameters:
theMessage - the message of the exception

ChainedRuntimeException

public ChainedRuntimeException(String theMessage,
                               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(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.

printStackTrace

public void printStackTrace(PrintStream thePs)
Print the full stack trace, including the original exception.
Parameters:
thePs - the byte stream in which to print the stack trace
Affected by:
around() in LogAspect.

printStackTrace

public void printStackTrace(PrintWriter thePw)
Print the full stack trace, including the original exception.
Parameters:
thePw - the character stream in which to print the stack trace
Affected by:
around() in LogAspect.


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