KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > scriptella > configuration > ConfigurationException


1 /*
2  * Copyright 2006-2007 The Scriptella Project Team.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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 package scriptella.configuration;
17
18 import scriptella.core.SystemException;
19
20
21 /**
22  * TODO: Add documentation
23  *
24  * @author Fyodor Kupolov
25  * @version 1.0
26  */

27 public class ConfigurationException extends SystemException {
28     private transient XmlElement element;
29
30     /**
31      * Constructs a new runtime exception with <code>null</code> as its
32      * detail message. The cause is not initialized, and may subsequently be
33      * initialized by a call to {@link #initCause}.
34      */

35     public ConfigurationException() {
36     }
37
38     public ConfigurationException(XmlElement element) {
39         this.element = element;
40     }
41
42     public ConfigurationException(String JavaDoc message) {
43         super(message);
44     }
45
46     public ConfigurationException(String JavaDoc message, XmlElement element) {
47         super(message);
48         this.element = element;
49     }
50
51     /**
52      * Constructs a new runtime exception with the specified detail message and
53      * cause. <p>Note that the detail message associated with
54      * <code>cause</code> is <i>not</i> automatically incorporated in
55      * this runtime exception's detail message.
56      *
57      * @param message the detail message (which is saved for later retrieval
58      * by the {@link #getMessage()} method).
59      * @param cause the cause (which is saved for later retrieval by the
60      * {@link #getCause()} method). (A <tt>null</tt> value is
61      * permitted, and indicates that the cause is nonexistent or
62      * unknown.)
63      * @since 1.4
64      */

65     public ConfigurationException(String JavaDoc message, Throwable JavaDoc cause) {
66         super(message, cause);
67     }
68
69     public ConfigurationException(String JavaDoc message, Throwable JavaDoc cause,
70                                   XmlElement element) {
71         super(message, cause);
72         this.element = element;
73     }
74
75     /**
76      * Constructs a new runtime exception with the specified cause and a
77      * detail message of <tt>(cause==null ? null : cause.toString())</tt>
78      * (which typically contains the class and detail message of
79      * <tt>cause</tt>). This constructor is useful for runtime exceptions
80      * that are little more than wrappers for other throwables.
81      *
82      * @param cause the cause (which is saved for later retrieval by the
83      * {@link #getCause()} method). (A <tt>null</tt> value is
84      * permitted, and indicates that the cause is nonexistent or
85      * unknown.)
86      * @since 1.4
87      */

88     public ConfigurationException(Throwable JavaDoc cause) {
89         super(cause);
90     }
91
92     public ConfigurationException(Throwable JavaDoc cause, XmlElement element) {
93         super(cause);
94         this.element = element;
95     }
96 }
97
Popular Tags