1 package org.mod4j.runtime.exception;
2
3 /**
4 * Exception thrown if a configuration error occures.
5 *
6 * @author Philippe Tjon-a-Hen
7 * @author Eric Jan Malotaux
8 *
9 */
10 @SuppressWarnings("serial")
11 public class ConfigurationException extends RuntimeException {
12
13 /**
14 * Constructs a new configuration exception with <code>null</code> as its detail message. The cause is not
15 * initialized, and may subsequently be initialized by a call to {@link #initCause}.
16 */
17 public ConfigurationException() {
18 super();
19 }
20
21 /**
22 * Constructs a new configuration exception with the specified detail message and cause.
23 * <p>
24 * Note that the detail message associated with <code>cause</code> is <i>not</i> automatically incorporated in
25 * this configuration exception's detail message.
26 *
27 * @param message
28 * the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
29 * @param cause
30 * the cause (which is saved for later retrieval by the {@link #getCause()} method). (A <tt>null</tt>
31 * value is permitted, and indicates that the cause is nonexistent or unknown.)
32 */
33 public ConfigurationException(String message, Throwable cause) {
34 super(message, cause);
35 }
36
37 /**
38 * Constructs a new configuration exception with the specified detail message. The cause is not initialized, and may
39 * subsequently be initialized by a call to {@link #initCause}.
40 *
41 * @param message
42 * the detail message. The detail message is saved for later retrieval by the {@link #getMessage()}
43 * method.
44 */
45 public ConfigurationException(String message) {
46 super(message);
47 }
48
49 /**
50 * Constructs a new configuration exception with the specified cause and a detail message of
51 * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail message of
52 * <tt>cause</tt>). This constructor is useful for configuration exceptions that are little more than wrappers
53 * for other throwables.
54 *
55 * @param cause
56 * the cause (which is saved for later retrieval by the {@link #getCause()} method). (A <tt>null</tt>
57 * value is permitted, and indicates that the cause is nonexistent or unknown.)
58 */
59 public ConfigurationException(Throwable cause) {
60 super(cause);
61 }
62
63 }