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 JMeterError extends Error {
27: private Throwable savedCause; // Support JDK1.4 getCause() on JDK1.3
28:
29: /**
30: *
31: */
32: public JMeterError() {
33: super ();
34: }
35:
36: /**
37: * @param s
38: */
39: public JMeterError(String s) {
40: super (s);
41: }
42:
43: /**
44: * @param cause
45: */
46: public JMeterError(Throwable cause) {
47: // JDK1.4: super(cause);
48: savedCause = cause;
49: }
50:
51: /**
52: * @param message
53: * @param cause
54: */
55: public JMeterError(String message, Throwable cause) {
56: // JDK1.4: super(message, cause);
57: super (message);
58: savedCause = cause;
59: }
60:
61: /**
62: * Local version of getCause() for JDK1.3 support
63: *
64: */
65: public Throwable getCause() {
66: return savedCause;
67: }
68:
69: }
|