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: package org.apache.jmeter.protocol.http.parser;
19:
20: /**
21: * Error class for use with HTMLParser classes. The main rationale for the class
22: * is to support chained Errors in JDK 1.3
23: *
24: * @author <a href="mailto:jsalvata@apache.org">Jordi Salvat i Alabart</a>
25: * @version $Revision: 493789 $ updated on $Date: 2007-01-07 18:10:21 +0000 (Sun, 07 Jan 2007) $
26: */
27: public class HTMLParseError extends Error {
28: private Throwable savedCause; // Support JDK1.4 getCause() on JDK1.3
29:
30: /**
31: *
32: */
33: public HTMLParseError() {
34: super ();
35: }
36:
37: /**
38: * @param message
39: */
40: public HTMLParseError(String message) {
41: super (message);
42: }
43:
44: /**
45: * @param cause
46: */
47: public HTMLParseError(Throwable cause) {
48: // JDK1.4: super(cause);
49: savedCause = cause;
50: }
51:
52: /**
53: * @param message
54: * @param cause
55: */
56: public HTMLParseError(String message, Throwable cause) {
57: // JDK1.4: super(message, cause);
58: super (message);
59: savedCause = cause;
60: }
61:
62: /**
63: * Local verstion of getCause() for JDK1.3 support
64: *
65: */
66: public Throwable getCause() {
67: return savedCause;
68: }
69: }
|