2
* Copyright 2003-2004 The Apache Software Foundation.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
17
// $Id: TransformerFactoryConfigurationError.java 226183 2005-04-08 10:39:14Z neeraj $
19
package javax.xml.transform;
22
* Thrown when a problem with configuration with the Transformer Factories
23
* exists. This error will typically be thrown when the class of a
24
* transformation factory specified in the system properties cannot be found
27
public class TransformerFactoryConfigurationError extends Error {
30
* <code>Exception</code> for the
31
* <code>TransformerFactoryConfigurationError</code>.
33
private Exception exception;
36
* Create a new <code>TransformerFactoryConfigurationError</code> with no
39
public TransformerFactoryConfigurationError() {
43
this.exception = null;
47
* Create a new <code>TransformerFactoryConfigurationError</code> with
48
* the <code>String</code> specified as an error message.
50
* @param msg The error message for the exception.
52
public TransformerFactoryConfigurationError(String msg) {
56
this.exception = null;
60
* Create a new <code>TransformerFactoryConfigurationError</code> with a
61
* given <code>Exception</code> base cause of the error.
63
* @param e The exception to be encapsulated in a
64
* TransformerFactoryConfigurationError.
66
public TransformerFactoryConfigurationError(Exception e) {
74
* Create a new <code>TransformerFactoryConfigurationError</code> with the
75
* given <code>Exception</code> base cause and detail message.
77
* @param e The exception to be encapsulated in a
78
* TransformerFactoryConfigurationError
79
* @param msg The detail message.
81
public TransformerFactoryConfigurationError(Exception e, String msg) {
89
* Return the message (if any) for this error . If there is no
90
* message for the exception and there is an encapsulated
91
* exception then the message of that exception will be returned.
93
* @return The error message.
95
public String getMessage() {
97
String message = super.getMessage();
99
if ((message == null) && (exception != null)) {
100
return exception.getMessage();
107
* Return the actual exception (if any) that caused this exception to
110
* @return The encapsulated exception, or null if there is none.
112
public Exception getException() {