001 /*
002 * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation. Sun designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Sun in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022 * CA 95054 USA or visit www.sun.com if you need additional information or
023 * have any questions.
024 */
025
026 package javax.xml.transform;
027
028 /**
029 * Indicates a serious configuration error.
030 */
031 public class TransformerConfigurationException extends
032 TransformerException {
033
034 /**
035 * Create a new <code>TransformerConfigurationException</code> with no
036 * detail mesage.
037 */
038 public TransformerConfigurationException() {
039 super ("Configuration Error");
040 }
041
042 /**
043 * Create a new <code>TransformerConfigurationException</code> with
044 * the <code>String </code> specified as an error message.
045 *
046 * @param msg The error message for the exception.
047 */
048 public TransformerConfigurationException(String msg) {
049 super (msg);
050 }
051
052 /**
053 * Create a new <code>TransformerConfigurationException</code> with a
054 * given <code>Exception</code> base cause of the error.
055 *
056 * @param e The exception to be encapsulated in a
057 * TransformerConfigurationException.
058 */
059 public TransformerConfigurationException(Throwable e) {
060 super (e);
061 }
062
063 /**
064 * Create a new <code>TransformerConfigurationException</code> with the
065 * given <code>Exception</code> base cause and detail message.
066 *
067 * @param e The exception to be encapsulated in a
068 * TransformerConfigurationException
069 * @param msg The detail message.
070 */
071 public TransformerConfigurationException(String msg, Throwable e) {
072 super (msg, e);
073 }
074
075 /**
076 * Create a new TransformerConfigurationException from a message and a Locator.
077 *
078 * <p>This constructor is especially useful when an application is
079 * creating its own exception from within a DocumentHandler
080 * callback.</p>
081 *
082 * @param message The error or warning message.
083 * @param locator The locator object for the error or warning.
084 */
085 public TransformerConfigurationException(String message,
086 SourceLocator locator) {
087 super (message, locator);
088 }
089
090 /**
091 * Wrap an existing exception in a TransformerConfigurationException.
092 *
093 * @param message The error or warning message, or null to
094 * use the message from the embedded exception.
095 * @param locator The locator object for the error or warning.
096 * @param e Any exception.
097 */
098 public TransformerConfigurationException(String message,
099 SourceLocator locator, Throwable e) {
100 super(message, locator, e);
101 }
102 }
|