org.apache.cactus.client
class AssertionFailedErrorWrapper

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--junit.framework.AssertionFailedError
                    |
                    +--org.apache.cactus.client.AssertionFailedErrorWrapper
All Implemented Interfaces:
Serializable
Known Advisors:
LogAspect

public class AssertionFailedErrorWrapper
extends junit.framework.AssertionFailedError

Same as ServletExceptionWrapper except that this exception class extends JUnit AssertionFailedError so that JUnit will print a different message in it's runner console.

Version:
$Id: AssertionFailedErrorWrapper.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
Author:
Vincent Massol

Constructor Summary
AssertionFailedErrorWrapper(String theMessage)
          Standard throwable constructor.
AssertionFailedErrorWrapper()
          Standard throwable constructor.
AssertionFailedErrorWrapper(String theMessage, String theClassName, String theStackTrace)
          The constructor to use to simulate a real exception.
 
Method Summary
 boolean instanceOf(Class theClass)
          As all the server exceptions are wrapped into this ServletExceptionWrapper class, we need to be able to know the original server exception class.
          Affected by: LogAspect
 void printStackTrace(PrintStream thePs)
          Simulates a printing of a stack trace by printing the string stack trace
          Affected by: LogAspect
 void printStackTrace(PrintWriter thePw)
          Simulates a printing of a stack trace by printing the string stack trace
          Affected by: LogAspect
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssertionFailedErrorWrapper

public AssertionFailedErrorWrapper(String theMessage)
Standard throwable constructor.
Parameters:
theMessage - the exception message

AssertionFailedErrorWrapper

public AssertionFailedErrorWrapper()
Standard throwable constructor.

AssertionFailedErrorWrapper

public AssertionFailedErrorWrapper(String theMessage,
                                   String theClassName,
                                   String theStackTrace)
The constructor to use to simulate a real exception.
Parameters:
theMessage - the server exception message
theClassName - the server exception class name
theStackTrace - the server exception stack trace
Method Detail

instanceOf

public boolean instanceOf(Class theClass)
As all the server exceptions are wrapped into this ServletExceptionWrapper class, we need to be able to know the original server exception class.
Parameters:
theClass - the class to compare with the server exception class
Returns:
true if the current exception class is of the same type as the class passed as parameter.
Affected by:
around() in LogAspect.

printStackTrace

public void printStackTrace(PrintStream thePs)
Simulates a printing of a stack trace by printing the string stack trace
Parameters:
thePs - the stream to which to output the stack trace
Affected by:
around() in LogAspect.

printStackTrace

public void printStackTrace(PrintWriter thePw)
Simulates a printing of a stack trace by printing the string stack trace
Parameters:
thePw - the writer to which to output the stack trace
Affected by:
around() in LogAspect.


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