| |
|
| java.lang.Object java.lang.Throwable org.apache.cactus.internal.client.ServletExceptionWrapper
ServletExceptionWrapper | public class ServletExceptionWrapper extends Throwable (Code) | | Wrapper around a Throwable object. Whenever an exception occurs
in a test case executed on the server side, the text of this exception
along with the stack trace as a String are sent back in the HTTP response.
This is because some exceptions are not serializable and because the stack
trace is implemented as a transient variable by the JDK so it
cannot be transported in the response. However, we need to send a real
exception object to JUnit so that the exception stack trace will be printed
in the JUnit console. This class does this by being a Throwable
and overloading the printStackTrace() methods to print a
text stack trace.
version: $Id: ServletExceptionWrapper.java 238991 2004-05-22 11:34:50Z vmassol $ |
ServletExceptionWrapper | public ServletExceptionWrapper(String theMessage)(Code) | | Standard throwable constructor.
Parameters: theMessage - the exception message |
ServletExceptionWrapper | public ServletExceptionWrapper()(Code) | | Standard throwable constructor.
|
ServletExceptionWrapper | public ServletExceptionWrapper(String theMessage, String theClassName, String theStackTrace)(Code) | | The constructor to use to simulate a real exception.
Parameters: theMessage - the server exception message Parameters: theClassName - the server exception class name Parameters: theStackTrace - the server exception stack trace |
getWrappedClassName | public String getWrappedClassName()(Code) | | the wrapped class name |
printStackTrace | public void printStackTrace(PrintStream thePs)(Code) | | Simulates a printing of a stack trace by printing the string stack trace
Parameters: thePs - the stream to which to output the stack trace |
printStackTrace | public void printStackTrace(PrintWriter thePw)(Code) | | Simulates a printing of a stack trace by printing the string stack trace
Parameters: thePw - the writer to which to output the stack trace |
|
|
|