1 /*******************************************************************************
2 * Copyright (c) 2007, 2014 Massimiliano Ziccardi
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 it.jnrpe.server;
17
18 /**
19 * Exception thrown in case of invalid configuration file.
20 *
21 * @author Massimiliano Ziccardi
22 */
23 public class ConfigurationException extends Exception {
24 /**
25 *
26 */
27 private static final long serialVersionUID = 5632302766938426408L;
28
29 /**
30 * Constructs a new exception with <code>null</code> as its detail message.
31 * The cause is not initialized, and may subsequently be initialized by a
32 * call to {@link #initCause}.
33 */
34 public ConfigurationException() {
35 super();
36 }
37
38 /**
39 * Constructs a new exception with the specified detail message and
40 * cause. <p>Note that the detail message associated with
41 * <code>cause</code> is <i>not</i> automatically incorporated in
42 * this exception's detail message.
43 *
44 * @param message the detail message (which is saved for later retrieval
45 * by the {@link #getMessage()} method).
46 * @param cause the cause (which is saved for later retrieval by the
47 * {@link #getCause()} method). (A <tt>null</tt> value is
48 * permitted, and indicates that the cause is nonexistent or
49 * unknown.)
50 */
51 public ConfigurationException(final String message, final Throwable cause) {
52 super(message, cause);
53 }
54
55 /**
56 * Constructs a new exception with the specified detail message. The
57 * cause is not initialized, and may subsequently be initialized by
58 * a call to {@link #initCause}.
59 *
60 * @param message the detail message. The detail message is saved for
61 * later retrieval by the {@link #getMessage()} method.
62 */
63 public ConfigurationException(final String message) {
64 super(message);
65 }
66
67 /**
68 * Constructs a new exception with the specified cause and a detail
69 * message of <tt>(cause==null ? null : cause.toString())</tt> (which
70 * typically contains the class and detail message of <tt>cause</tt>).
71 * This constructor is useful for exceptions that are little more than
72 * wrappers for other throwables (for example, {@link
73 * java.security.PrivilegedActionException}).
74 *
75 * @param cause the cause (which is saved for later retrieval by the
76 * {@link #getCause()} method). (A <tt>null</tt> value is
77 * permitted, and indicates that the cause is nonexistent or
78 * unknown.)
79 */
80 public ConfigurationException(final Throwable cause) {
81 super(cause);
82 }
83 }