KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jorphan > util > JMeterError


1 // $Header: /home/cvs/jakarta-jmeter/src/jorphan/org/apache/jorphan/util/JMeterError.java,v 1.2 2004/03/30 18:07:21 sebb Exp $
2
/*
3  * Copyright 2003-2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17 */

18
19 package org.apache.jorphan.util;
20
21 /**
22  * The rationale for this class is to support chained Errors in JDK 1.3
23  *
24  * @version $Revision: 1.2 $ $Date: 2004/03/30 18:07:21 $
25  */

26 public class JMeterError extends Error JavaDoc
27 {
28     private Throwable JavaDoc savedCause; //Support JDK1.4 getCause() on JDK1.3
29

30     /**
31      *
32      */

33     public JMeterError()
34     {
35         super();
36     }
37
38     /**
39      * @param s
40      */

41     public JMeterError(String JavaDoc s)
42     {
43         super(s);
44     }
45
46     /**
47      * @param cause
48      */

49     public JMeterError(Throwable JavaDoc cause)
50     {
51         //JDK1.4: super(cause);
52
savedCause = cause;
53     }
54
55     /**
56      * @param message
57      * @param cause
58      */

59     public JMeterError(String JavaDoc message, Throwable JavaDoc cause)
60     {
61         //JDK1.4: super(message, cause);
62
super(message);
63         savedCause = cause;
64     }
65     
66     /**
67      * Local version of getCause() for JDK1.3 support
68      *
69      */

70     public Throwable JavaDoc getCause()
71     {
72         return savedCause;
73     }
74
75 }
76
Popular Tags