Home | History | Annotate | Download | only in dtm
      1 /*
      2  * Licensed to the Apache Software Foundation (ASF) under one
      3  * or more contributor license agreements. See the NOTICE file
      4  * distributed with this work for additional information
      5  * regarding copyright ownership. The ASF licenses this file
      6  * to you under the Apache License, Version 2.0 (the  "License");
      7  * you may not use this file except in compliance with the License.
      8  * You may obtain a copy of the License at
      9  *
     10  *     http://www.apache.org/licenses/LICENSE-2.0
     11  *
     12  * Unless required by applicable law or agreed to in writing, software
     13  * distributed under the License is distributed on an "AS IS" BASIS,
     14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15  * See the License for the specific language governing permissions and
     16  * limitations under the License.
     17  */
     18 /*
     19  * $Id: DTMConfigurationException.java 468653 2006-10-28 07:07:05Z minchau $
     20  */
     21 package org.apache.xml.dtm;
     22 
     23 import javax.xml.transform.SourceLocator;
     24 
     25 /**
     26  * Indicates a serious configuration error.
     27  */
     28 public class DTMConfigurationException extends DTMException {
     29     static final long serialVersionUID = -4607874078818418046L;
     30 
     31     /**
     32      * Create a new <code>DTMConfigurationException</code> with no
     33      * detail mesage.
     34      */
     35     public DTMConfigurationException() {
     36         super("Configuration Error");
     37     }
     38 
     39     /**
     40      * Create a new <code>DTMConfigurationException</code> with
     41      * the <code>String </code> specified as an error message.
     42      *
     43      * @param msg The error message for the exception.
     44      */
     45     public DTMConfigurationException(String msg) {
     46         super(msg);
     47     }
     48 
     49     /**
     50      * Create a new <code>DTMConfigurationException</code> with a
     51      * given <code>Exception</code> base cause of the error.
     52      *
     53      * @param e The exception to be encapsulated in a
     54      * DTMConfigurationException.
     55      */
     56     public DTMConfigurationException(Throwable e) {
     57         super(e);
     58     }
     59 
     60     /**
     61      * Create a new <code>DTMConfigurationException</code> with the
     62      * given <code>Exception</code> base cause and detail message.
     63      *
     64      * @param msg The detail message.
     65      * @param e The exception to be wrapped in a DTMConfigurationException
     66      */
     67     public DTMConfigurationException(String msg, Throwable e) {
     68         super(msg, e);
     69     }
     70 
     71     /**
     72      * Create a new DTMConfigurationException from a message and a Locator.
     73      *
     74      * <p>This constructor is especially useful when an application is
     75      * creating its own exception from within a DocumentHandler
     76      * callback.</p>
     77      *
     78      * @param message The error or warning message.
     79      * @param locator The locator object for the error or warning.
     80      */
     81     public DTMConfigurationException(String message,
     82                                              SourceLocator locator) {
     83         super(message, locator);
     84     }
     85 
     86     /**
     87      * Wrap an existing exception in a DTMConfigurationException.
     88      *
     89      * @param message The error or warning message, or null to
     90      *                use the message from the embedded exception.
     91      * @param locator The locator object for the error or warning.
     92      * @param e Any exception.
     93      */
     94     public DTMConfigurationException(String message,
     95                                              SourceLocator locator,
     96                                              Throwable e) {
     97         super(message, locator, e);
     98     }
     99 }
    100