KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > junit > internal > LocationExceptionWrapper


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.junit.internal;
8
9
10 import java.io.PrintStream JavaDoc;
11 import java.io.PrintWriter JavaDoc;
12
13
14 /**
15  * This class is used to display all other exceptions that
16  * occurred on the 'test location' side.
17  *
18  * @author Brian Pontarelli
19  * @since 1.0
20  * @version 1.0
21  */

22 public class LocationExceptionWrapper extends Throwable JavaDoc
23 {
24     /**
25      * The test location stack trace
26      */

27     private String JavaDoc stackTrace;
28
29
30     /**
31      * Constructs a new wrapper using the given message and stack trace
32      */

33     public LocationExceptionWrapper(String JavaDoc message, String JavaDoc stackTrace)
34     {
35         super(message);
36         this.stackTrace = stackTrace;
37     }
38
39
40     /**
41      * Prints out the stack trace of the test location error NOT this error
42      */

43     public void printStackTrace(PrintStream JavaDoc ps)
44     {
45         ps.print(stackTrace);
46     }
47
48     /**
49      * Prints out the stack trace of the test location error NOT this error
50      */

51     public void printStackTrace(PrintWriter JavaDoc pw)
52     {
53         pw.print(stackTrace);
54     }
55 }
56
57
Popular Tags