01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: 493784 $ $Date: 2007-01-07 17:57:55 +0000 (Sun, 07 Jan 2007) $
25: */
26: public class JMeterException extends Exception {
27: private Throwable savedCause; // Support JDK1.4 getCause() on JDK1.3
28:
29: /**
30: *
31: */
32: public JMeterException() {
33: super ();
34: // TODO Auto-generated constructor stub
35: }
36:
37: /**
38: * @param s
39: */
40: public JMeterException(String s) {
41: super (s);
42: // TODO Auto-generated constructor stub
43: }
44:
45: /**
46: * @param cause
47: */
48: public JMeterException(Throwable cause) {
49: // JDK1.4: super(cause);
50: savedCause = cause;
51: }
52:
53: /**
54: * @param message
55: * @param cause
56: */
57: public JMeterException(String message, Throwable cause) {
58: // JDK1.4: super(message, cause);
59: super (message);
60: savedCause = cause;
61: }
62:
63: /**
64: * Local version of getCause() for JDK1.3 support
65: *
66: */
67: public Throwable getCause() {
68: return savedCause;
69: }
70:
71: }
|