001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the "License"); 007 * you may not use this file except in compliance with the License. 008 * You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 /* 019 * $Id: DTMConfigurationException.java 468653 2006-10-28 07:07:05Z minchau $ 020 */ 021 package org.apache.xml.dtm; 022 023 import javax.xml.transform.SourceLocator; 024 025 /** 026 * Indicates a serious configuration error. 027 */ 028 public class DTMConfigurationException extends DTMException { 029 static final long serialVersionUID = -4607874078818418046L; 030 031 /** 032 * Create a new <code>DTMConfigurationException</code> with no 033 * detail mesage. 034 */ 035 public DTMConfigurationException() { 036 super("Configuration Error"); 037 } 038 039 /** 040 * Create a new <code>DTMConfigurationException</code> with 041 * the <code>String </code> specified as an error message. 042 * 043 * @param msg The error message for the exception. 044 */ 045 public DTMConfigurationException(String msg) { 046 super(msg); 047 } 048 049 /** 050 * Create a new <code>DTMConfigurationException</code> with a 051 * given <code>Exception</code> base cause of the error. 052 * 053 * @param e The exception to be encapsulated in a 054 * DTMConfigurationException. 055 */ 056 public DTMConfigurationException(Throwable e) { 057 super(e); 058 } 059 060 /** 061 * Create a new <code>DTMConfigurationException</code> with the 062 * given <code>Exception</code> base cause and detail message. 063 * 064 * @param msg The detail message. 065 * @param e The exception to be wrapped in a DTMConfigurationException 066 */ 067 public DTMConfigurationException(String msg, Throwable e) { 068 super(msg, e); 069 } 070 071 /** 072 * Create a new DTMConfigurationException from a message and a Locator. 073 * 074 * <p>This constructor is especially useful when an application is 075 * creating its own exception from within a DocumentHandler 076 * callback.</p> 077 * 078 * @param message The error or warning message. 079 * @param locator The locator object for the error or warning. 080 */ 081 public DTMConfigurationException(String message, 082 SourceLocator locator) { 083 super(message, locator); 084 } 085 086 /** 087 * Wrap an existing exception in a DTMConfigurationException. 088 * 089 * @param message The error or warning message, or null to 090 * use the message from the embedded exception. 091 * @param locator The locator object for the error or warning. 092 * @param e Any exception. 093 */ 094 public DTMConfigurationException(String message, 095 SourceLocator locator, 096 Throwable e) { 097 super(message, locator, e); 098 } 099 }