2011/08/05 - Jakarta Cactus has been retired.

For more information, please explore the Attic.

Clover coverage report - Cactus 1.8dev for J2EE API 1.3
Coverage timestamp: Sun Mar 26 2006 18:50:18 BRT
file stats: LOC: 122   Methods: 6
NCLOC: 50   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
AssertionFailedErrorWrapper.java 0% 0% 0% 0%
coverage
 1   
 /* 
 2   
  * ========================================================================
 3   
  * 
 4   
  * Copyright 2001-2003 The Apache Software Foundation.
 5   
  *
 6   
  * Licensed under the Apache License, Version 2.0 (the "License");
 7   
  * you may not use this file except in compliance with the License.
 8   
  * You may obtain a copy of the License at
 9   
  * 
 10   
  *   http://www.apache.org/licenses/LICENSE-2.0
 11   
  * 
 12   
  * Unless required by applicable law or agreed to in writing, software
 13   
  * distributed under the License is distributed on an "AS IS" BASIS,
 14   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15   
  * See the License for the specific language governing permissions and
 16   
  * limitations under the License.
 17   
  * 
 18   
  * ========================================================================
 19   
  */
 20   
 package org.apache.cactus.internal.client;
 21   
 
 22   
 import java.io.PrintStream;
 23   
 import java.io.PrintWriter;
 24   
 
 25   
 import junit.framework.AssertionFailedError;
 26   
 
 27   
 /**
 28   
  * Same as <code>ServletExceptionWrapper</code> except that this exception class
 29   
  * extends JUnit <code>AssertionFailedError</code> so that JUnit will
 30   
  * print a different message in it's runner console.
 31   
  *
 32   
  * @version $Id: AssertionFailedErrorWrapper.java 238991 2004-05-22 11:34:50Z vmassol $
 33   
  */
 34   
 public class AssertionFailedErrorWrapper extends AssertionFailedError
 35   
 {
 36   
     /**
 37   
      * The stack trace that was sent back from the servlet redirector as a
 38   
      * string.
 39   
      */
 40   
     private String stackTrace;
 41   
 
 42   
     /**
 43   
      * The class name of the exception that was raised on the server side.
 44   
      */
 45   
     private String className;
 46   
 
 47   
     /**
 48   
      * Standard throwable constructor.
 49   
      *
 50   
      * @param theMessage the exception message
 51   
      */
 52  0
     public AssertionFailedErrorWrapper(String theMessage)
 53   
     {
 54  0
         super(theMessage);
 55   
     }
 56   
 
 57   
     /**
 58   
      * Standard throwable constructor.
 59   
      */
 60  0
     public AssertionFailedErrorWrapper()
 61   
     {
 62  0
         super();
 63   
     }
 64   
 
 65   
     /**
 66   
      * The constructor to use to simulate a real exception.
 67   
      *
 68   
      * @param theMessage the server exception message
 69   
      * @param theClassName the server exception class name
 70   
      * @param theStackTrace the server exception stack trace
 71   
      */
 72  0
     public AssertionFailedErrorWrapper(String theMessage, String theClassName, 
 73   
         String theStackTrace)
 74   
     {
 75  0
         super(theMessage);
 76  0
         this.className = theClassName;
 77  0
         this.stackTrace = theStackTrace;
 78   
     }
 79   
 
 80   
     /**
 81   
      * Simulates a printing of a stack trace by printing the string stack trace
 82   
      *
 83   
      * @param thePs the stream to which to output the stack trace
 84   
      */
 85  0
     public void printStackTrace(PrintStream thePs)
 86   
     {
 87  0
         if (this.stackTrace == null)
 88   
         {
 89  0
             thePs.print(getMessage());
 90   
         }
 91   
         else
 92   
         {
 93  0
             thePs.print(this.stackTrace);
 94   
         }
 95   
     }
 96   
 
 97   
     /**
 98   
      * Simulates a printing of a stack trace by printing the string stack trace
 99   
      *
 100   
      * @param thePw the writer to which to output the stack trace
 101   
      */
 102  0
     public void printStackTrace(PrintWriter thePw)
 103   
     {
 104  0
         if (this.stackTrace == null)
 105   
         {
 106  0
             thePw.print(getMessage());
 107   
         }
 108   
         else
 109   
         {
 110  0
             thePw.print(this.stackTrace);
 111   
         }
 112   
     }
 113   
 
 114   
     /**
 115   
      * @return the wrapped class name
 116   
      */
 117  0
     public String getWrappedClassName()
 118   
     {
 119  0
         return this.className;
 120   
     }
 121   
 }
 122