01: /*
02: * @(#)SAXException.java 1.2 04/12/06
03: *
04: * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * See the file "LICENSE.txt" for information on usage and redistribution
07: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package pnuts.xml;
10:
11: import java.io.*;
12:
13: class SAXException extends org.xml.sax.SAXException {
14: private Throwable cause;
15:
16: public SAXException(String message) {
17: super (message);
18: }
19:
20: public SAXException(Exception cause) {
21: super (cause);
22: this .cause = cause;
23: }
24:
25: public void printStackTrace(PrintStream s) {
26: if (cause != null) {
27: cause.printStackTrace(s);
28: } else {
29: super .printStackTrace(s);
30: }
31: }
32:
33: public void printStackTrace(PrintWriter s) {
34: if (cause != null) {
35: cause.printStackTrace(s);
36: } else {
37: super.printStackTrace(s);
38: }
39: }
40: }
|