KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > core > config > ConfigurationInitializtionException


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.core.config;
19
20 import org.sape.carbon.core.util.classify.SeverityEnum;
21
22 /**
23  * This exception is thrown when the configuration service cannot be
24  * initialized. It has a severity of SeverityEnum.FATAL.
25  *
26  * Copyright 2003 Sapient
27  * @since carbon 2.0
28  * @author Douglas Voet, March 2003
29  * @version $Revision: 1.4 $($Author: dvoet $ / $Date: 2003/05/05 21:21:15 $)
30  */

31 public class ConfigurationInitializtionException
32     extends ConfigurationRuntimeException {
33
34     /**
35      * Constructs an exception with the provided source and message
36      *
37      * @param sourceClass The source class of this exception
38      * @param message string information relating to this exception
39      */

40     public ConfigurationInitializtionException(
41             Class JavaDoc sourceClass, String JavaDoc message) {
42
43         super(
44             sourceClass,
45             "Could not initialize the configuration service, reason: "
46                 + message);
47     }
48
49     /**
50      * Constructs an exception with the provided source, message and
51      * cause
52      *
53      * @param sourceClass The source class of this exception
54      * @param message string information relating to this exception
55      * @param cause a throwable that can be considered the cause
56      * of the current exception (used in levelizing exceptions)
57      */

58     public ConfigurationInitializtionException(
59             Class JavaDoc sourceClass, String JavaDoc message, Throwable JavaDoc cause) {
60
61         super(
62             sourceClass,
63             "Could not initialize the configuration service, reason: "
64                 + message,
65             cause);
66     }
67
68     /**
69      * Constructs an exception with the provided source and
70      * cause using a generic message.
71      *
72      * @param sourceClass The source class of this exception
73      * @param cause a throwable that can be considered the cause
74      * of the current exception (used in levelizing exceptions)
75      */

76     public ConfigurationInitializtionException(
77             Class JavaDoc sourceClass, Throwable JavaDoc cause) {
78
79         super(
80             sourceClass,
81             "Could not initialize the configuration service",
82             cause);
83     }
84
85     /**
86      * @see BaseException#getSeverity
87      */

88      public SeverityEnum getSeverity() {
89         return SeverityEnum.FATAL;
90     }
91 }
92
Popular Tags