• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements.  See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License.  You may obtain a copy of the License at
8  *
9  *     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 // $Id: TransformerConfigurationException.java 569994 2007-08-27 04:28:57Z mrglavas $
19 
20 package javax.xml.transform;
21 
22 /**
23  * Indicates a serious configuration error.
24  */
25 public class TransformerConfigurationException extends TransformerException {
26 
27     /**
28      * Create a new <code>TransformerConfigurationException</code> with no
29      * detail message.
30      */
TransformerConfigurationException()31     public TransformerConfigurationException() {
32         super("Configuration Error");
33     }
34 
35     /**
36      * Create a new <code>TransformerConfigurationException</code> with
37      * the <code>String </code> specified as an error message.
38      *
39      * @param msg The error message for the exception.
40      */
TransformerConfigurationException(String msg)41     public TransformerConfigurationException(String msg) {
42         super(msg);
43     }
44 
45     /**
46      * Create a new <code>TransformerConfigurationException</code> with a
47      * given <code>Exception</code> base cause of the error.
48      *
49      * @param e The exception to be encapsulated in a
50      * TransformerConfigurationException.
51      */
TransformerConfigurationException(Throwable e)52     public TransformerConfigurationException(Throwable e) {
53         super(e);
54     }
55 
56     /**
57      * Create a new <code>TransformerConfigurationException</code> with the
58      * given <code>Exception</code> base cause and detail message.
59      *
60      * @param e The exception to be encapsulated in a
61      *      TransformerConfigurationException
62      * @param msg The detail message.
63      */
TransformerConfigurationException(String msg, Throwable e)64     public TransformerConfigurationException(String msg, Throwable e) {
65         super(msg, e);
66     }
67 
68     /**
69      * Create a new TransformerConfigurationException from a message and a Locator.
70      *
71      * <p>This constructor is especially useful when an application is
72      * creating its own exception from within a DocumentHandler
73      * callback.</p>
74      *
75      * @param message The error or warning message.
76      * @param locator The locator object for the error or warning.
77      */
TransformerConfigurationException(String message, SourceLocator locator)78     public TransformerConfigurationException(String message,
79                                              SourceLocator locator) {
80         super(message, locator);
81     }
82 
83     /**
84      * Wrap an existing exception in a TransformerConfigurationException.
85      *
86      * @param message The error or warning message, or null to
87      *                use the message from the embedded exception.
88      * @param locator The locator object for the error or warning.
89      * @param e Any exception.
90      */
TransformerConfigurationException(String message, SourceLocator locator, Throwable e)91     public TransformerConfigurationException(String message,
92                                              SourceLocator locator,
93                                              Throwable e) {
94         super(message, locator, e);
95     }
96 }
97