KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > exception > ConfigurationError


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23
24 package org.infoglue.cms.exception;
25
26
27 /**
28  * <p>Thrown to indicate that some configuration resource is not setup correctly, is missing etc.</p>
29  * <p>Examples includes missing key in resource bundle, missing element/attribute in xml
30  * file, missing property file...</p>
31  *
32  * <p>This is an internal error so there is no need to localize the error message.</p>
33  *
34  * @author <a HREF="mailto:meat_for_the_butcher@yahoo.com">Patrik Nyborg</a>
35  */

36  
37 public class ConfigurationError extends Error JavaDoc
38 {
39
40     // The throwable that caused this ConfigurationError to get thrown (null is permitted).
41
private Throwable JavaDoc cause;
42
43
44     /**
45      * Construct a ConfigurationError with the detailed error message.
46      *
47      * @param message the detailed error message.
48      */

49     public ConfigurationError(String JavaDoc message)
50     {
51         super(message);
52     }
53
54     /**
55      * Construct a ConfigurationError with the detailed error message and cause.
56      *
57      * @param message the detailed error message.
58      * @param cause the throwable that caused this ConfigurationError to get thrown.
59      */

60     
61     public ConfigurationError(String JavaDoc message, Throwable JavaDoc cause)
62     {
63         super(message);
64         this.cause = cause;
65     }
66
67     /**
68      * Returns the cause of this ConfigurationError or null if the cause is nonexistent or unknown.
69      * (The cause is the throwable that caused this ConfigurationError to get thrown).
70      *
71      * @return the cause of this ConfigurationError or null if the cause is nonexistent or unknown.
72      */

73     public Throwable JavaDoc getCause()
74     {
75         return this.cause;
76     }
77 }
Popular Tags