01: /*
02: * $Id: TransformerFactoryConfigurationError.java,v 1.2 2001/11/02 22:07:45 db Exp $
03: * Copyright (C) 2001 Andrew Selkirk
04: * Copyright (C) 2001 David Brownell
05: *
06: * This file is part of GNU JAXP, a library.
07: *
08: * GNU JAXP is free software; you can redistribute it and/or modify
09: * it under the terms of the GNU General Public License as published by
10: * the Free Software Foundation; either version 2 of the License, or
11: * (at your option) any later version.
12: *
13: * GNU JAXP is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: * GNU General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public License
19: * along with this program; if not, write to the Free Software
20: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21: *
22: * As a special exception, if you link this library with other files to
23: * produce an executable, this library does not by itself cause the
24: * resulting executable to be covered by the GNU General Public License.
25: * This exception does not however invalidate any other reasons why the
26: * executable file might be covered by the GNU General Public License.
27: */
28: package javax.xml.transform;
29:
30: /**
31: * Reports a {@link TransformerFactory} configuration error.
32: * @author Andrew Selkirk, David Brownell
33: * @version 1.0
34: */
35: public class TransformerFactoryConfigurationError extends Error {
36: private Exception exception = null;
37:
38: //-------------------------------------------------------------
39: // Initialization ---------------------------------------------
40: //-------------------------------------------------------------
41:
42: public TransformerFactoryConfigurationError() {
43: }
44:
45: public TransformerFactoryConfigurationError(Exception e) {
46: exception = e;
47: }
48:
49: public TransformerFactoryConfigurationError(Exception e, String msg) {
50: super (msg);
51: exception = e;
52: }
53:
54: public TransformerFactoryConfigurationError(String msg) {
55: super (msg);
56: }
57:
58: //-------------------------------------------------------------
59: // Methods ----------------------------------------------------
60: //-------------------------------------------------------------
61:
62: public String getMessage() {
63: if (super .getMessage() == null && exception != null)
64: return exception.getMessage();
65: return super .getMessage();
66: }
67:
68: public Exception getException() {
69: return exception;
70: }
71: }
|