Source code: org/apache/jorphan/util/JMeterException.java
1 // $Header: /home/cvs/jakarta-jmeter/src/jorphan/org/apache/jorphan/util/JMeterException.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 JMeterException extends Exception
27 {
28 private Throwable savedCause; //Support JDK1.4 getCause() on JDK1.3
29
30 /**
31 *
32 */
33 public JMeterException()
34 {
35 super();
36 // TODO Auto-generated constructor stub
37 }
38
39 /**
40 * @param s
41 */
42 public JMeterException(String s)
43 {
44 super(s);
45 // TODO Auto-generated constructor stub
46 }
47 /**
48 * @param cause
49 */
50 public JMeterException(Throwable cause)
51 {
52 //JDK1.4: super(cause);
53 savedCause = cause;
54 }
55
56 /**
57 * @param message
58 * @param cause
59 */
60 public JMeterException(String message, Throwable cause)
61 {
62 //JDK1.4: super(message, cause);
63 super(message);
64 savedCause = cause;
65 }
66
67 /**
68 * Local version of getCause() for JDK1.3 support
69 *
70 */
71 public Throwable getCause()
72 {
73 return savedCause;
74 }
75
76
77 }