01: /*
02: * Copyright 1999-2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.
15: */
16: /*
17: * $Id: DTMConfigurationException.java,v 1.6 2005/01/23 00:52:40 mcnamara Exp $
18: */
19: package org.apache.xml.dtm;
20:
21: import javax.xml.transform.SourceLocator;
22:
23: /**
24: * Indicates a serious configuration error.
25: */
26: public class DTMConfigurationException extends DTMException {
27: static final long serialVersionUID = -4607874078818418046L;
28:
29: /**
30: * Create a new <code>DTMConfigurationException</code> with no
31: * detail mesage.
32: */
33: public DTMConfigurationException() {
34: super ("Configuration Error");
35: }
36:
37: /**
38: * Create a new <code>DTMConfigurationException</code> with
39: * the <code>String </code> specified as an error message.
40: *
41: * @param msg The error message for the exception.
42: */
43: public DTMConfigurationException(String msg) {
44: super (msg);
45: }
46:
47: /**
48: * Create a new <code>DTMConfigurationException</code> with a
49: * given <code>Exception</code> base cause of the error.
50: *
51: * @param e The exception to be encapsulated in a
52: * DTMConfigurationException.
53: */
54: public DTMConfigurationException(Throwable e) {
55: super (e);
56: }
57:
58: /**
59: * Create a new <code>DTMConfigurationException</code> with the
60: * given <code>Exception</code> base cause and detail message.
61: *
62: * @param msg The detail message.
63: * @param e The exception to be wrapped in a DTMConfigurationException
64: */
65: public DTMConfigurationException(String msg, Throwable e) {
66: super (msg, e);
67: }
68:
69: /**
70: * Create a new DTMConfigurationException from a message and a Locator.
71: *
72: * <p>This constructor is especially useful when an application is
73: * creating its own exception from within a DocumentHandler
74: * callback.</p>
75: *
76: * @param message The error or warning message.
77: * @param locator The locator object for the error or warning.
78: */
79: public DTMConfigurationException(String message,
80: SourceLocator locator) {
81: super (message, locator);
82: }
83:
84: /**
85: * Wrap an existing exception in a DTMConfigurationException.
86: *
87: * @param message The error or warning message, or null to
88: * use the message from the embedded exception.
89: * @param locator The locator object for the error or warning.
90: * @param e Any exception.
91: */
92: public DTMConfigurationException(String message,
93: SourceLocator locator, Throwable e) {
94: super(message, locator, e);
95: }
96: }
|