View Javadoc
1   /*
2    * Copyright 2007 Ralf Joachim
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5    * in compliance with the License. You may obtain a copy of the License at
6    *
7    * http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software distributed under the License
10   * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11   * or implied. See the License for the specific language governing permissions and limitations under
12   * the License.
13   *
14   * $Id: Configuration.java 6907 2007-03-28 21:24:52Z rjoachim $
15   */
16  package org.castor.core.util;
17  
18  import org.castor.core.exceptions.CastorRuntimeException;
19  
20  /**
21   * PropertiesException is an unchecked exception thrown when properties can not be loaded or if
22   * configuration property can't be converted to the requested type.
23   * 
24   * @version $Id: Configuration.java,v 1.8 2006/03/08 17:25:52 jens Exp $
25   * @author <a href="mailto:ralf DOT joachim AT syscon DOT eu">Ralf Joachim</a>
26   * @since 1.1.3
27   */
28  public final class PropertiesException extends CastorRuntimeException {
29    /** SerialVersionUID */
30    private static final long serialVersionUID = 4446761026170253291L;
31  
32    /**
33     * Constructs a new PropertiesException without a message. The cause is not initialized but may
34     * subsequently be initialized by a call to initCause(Throwable).
35     */
36    public PropertiesException() {
37      super();
38    }
39  
40    /**
41     * Constructs a new PropertiesException with the specified detail message. The cause is not
42     * initialized but may subsequently be initialized by a call to initCause(Throwable).
43     * 
44     * @param message The detail message.
45     */
46    public PropertiesException(final String message) {
47      super(message);
48    }
49  
50    /**
51     * Constructs a new PropertiesException with the specified cause and the detail message of the
52     * cause. This constructor is useful for exceptions that are wrappers for others.
53     * 
54     * @param cause The cause.
55     */
56    public PropertiesException(final Throwable cause) {
57      super(cause);
58    }
59  
60    /**
61     * Constructs a new PropertiesException with the specified detail message and cause.
62     * 
63     * @param message The detail message.
64     * @param cause The cause.
65     */
66    public PropertiesException(final String message, final Throwable cause) {
67      super(message, cause);
68    }
69  }