1 /*
2 * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25
26 package javax.xml.transform;
27
28 /**
29 * Indicates a serious configuration error.
30 */
31 public class TransformerConfigurationException extends TransformerException {
32
33 /**
34 * Create a new <code>TransformerConfigurationException</code> with no
35 * detail mesage.
36 */
37 public TransformerConfigurationException() {
38 super("Configuration Error");
39 }
40
41 /**
42 * Create a new <code>TransformerConfigurationException</code> with
43 * the <code>String </code> specified as an error message.
44 *
45 * @param msg The error message for the exception.
46 */
47 public TransformerConfigurationException(String msg) {
48 super(msg);
49 }
50
51 /**
52 * Create a new <code>TransformerConfigurationException</code> with a
53 * given <code>Exception</code> base cause of the error.
54 *
55 * @param e The exception to be encapsulated in a
56 * TransformerConfigurationException.
57 */
58 public TransformerConfigurationException(Throwable e) {
59 super(e);
60 }
61
62 /**
63 * Create a new <code>TransformerConfigurationException</code> with the
64 * given <code>Exception</code> base cause and detail message.
65 *
66 * @param e The exception to be encapsulated in a
67 * TransformerConfigurationException
68 * @param msg The detail message.
69 */
70 public TransformerConfigurationException(String msg, Throwable e) {
71 super(msg, e);
72 }
73
74 /**
75 * Create a new TransformerConfigurationException from a message and a Locator.
76 *
77 * <p>This constructor is especially useful when an application is
78 * creating its own exception from within a DocumentHandler
79 * callback.</p>
80 *
81 * @param message The error or warning message.
82 * @param locator The locator object for the error or warning.
83 */
84 public TransformerConfigurationException(String message,
85 SourceLocator locator) {
86 super(message, locator);
87 }
88
89 /**
90 * Wrap an existing exception in a TransformerConfigurationException.
91 *
92 * @param message The error or warning message, or null to
93 * use the message from the embedded exception.
94 * @param locator The locator object for the error or warning.
95 * @param e Any exception.
96 */
97 public TransformerConfigurationException(String message,
98 SourceLocator locator,
99 Throwable e) {
100 super(message, locator, e);
101 }
102 }