1    /*
2     * Copyright 2005 :torweg free software group
3     *
4     * This program is free software: you can redistribute it and/or modify
5     * it under the terms of the GNU General Public License as published by
6     * the Free Software Foundation, either version 3 of the License, or
7     * (at your option) any later version.
8     * 
9     * This program is distributed in the hope that it will be useful,
10    * but WITHOUT ANY WARRANTY; without even the implied warranty of
11    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    * GNU General Public License for more details.
13    * 
14    * You should have received a copy of the GNU General Public License
15    * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16    * 
17    */
18   package org.torweg.pulse.configuration;
19   
20   import org.torweg.pulse.service.PulseException;
21   
22   /**
23    * is an {@code Exception} indicating configuration problems.
24    * 
25    * @author Thomas Weber
26    * @version $Revision: 1914 $
27    */
28   public class ConfigurationException extends PulseException {
29   
30       /**
31        * serial version UID for java.io.Serializable.
32        */
33       private static final long serialVersionUID = -1978030074578265102L;
34   
35       /**
36        * constructs a new Exception for the given {@link Configuration} and
37        * {@link Configurable}.
38        * 
39        * @param conf
40        *            the configuration
41        * @param able
42        *            the configurable
43        */
44       public ConfigurationException(final Configuration conf,
45               final Configurable<?> able) {
46           super("Incompatible configuration "
47                   + conf.getClass().getCanonicalName()
48                   + " for configurable class "
49                   + able.getClass().getCanonicalName());
50       }
51   
52       /**
53        * constructs a new exception with {@code null} as its detail message.
54        */
55       public ConfigurationException() {
56           super();
57       }
58   
59       /**
60        * constructs a new exception with the specified detail message.
61        * 
62        * @param message
63        *            the message of the exception
64        */
65       public ConfigurationException(final String message) {
66           super(message);
67       }
68   
69       /**
70        * constructs a new exception with the specified detail message and cause.
71        * 
72        * @param message
73        *            the message of the exception
74        * @param cause
75        *            the cause of the exception
76        */
77       public ConfigurationException(final String message, final Throwable cause) {
78           super(message, cause);
79       }
80   
81       /**
82        * constructs a new exception with the specified detail message and cause.
83        * 
84        * @param cause
85        *            the cause of the exception
86        */
87       public ConfigurationException(final Throwable cause) {
88           super(cause);
89       }
90   
91   }
92