KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > uniqueid > UniqueIDServiceException


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.services.uniqueid;
19
20
21 import org.sape.carbon.core.exception.BaseException;
22 import org.sape.carbon.core.util.classify.SeverityEnum;
23
24 /**
25  * Exception that would be thrown if there is any error in the
26  * UniqueIDService.
27  *
28  * Copyright 2002 Sapient
29  * @since carbon 1.0
30  * @author Vivekanand Kirubanandan, June 2002
31  * @version $Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:38 $)
32  */

33 public class UniqueIDServiceException extends BaseException {
34
35     /**
36      * Constructor for GeneralSqlException.
37      *
38      * @param sourceClass The source class of this exception
39      * @param idName name of the id that was being processed when
40      * the exception is thrown.
41      * @param message string information relating to this exception
42      */

43     public UniqueIDServiceException (
44         Class JavaDoc sourceClass,
45         String JavaDoc idName,
46         String JavaDoc message) {
47
48         super(sourceClass, "ID name: [" + idName + "] - " + message);
49     }
50
51     /**
52      * Constructor for GeneralSqlException
53      *
54      * @param sourceClass The source class of this exception
55      * @param idName name of the id that was being processed when
56      * the exception is thrown.
57      * @param message string information relating to this exception
58      * @param cause a throwable that can be considered the cause
59      * of the current exception (used in levelizing exceptions)
60      */

61     public UniqueIDServiceException(
62         Class JavaDoc sourceClass,
63         String JavaDoc idName,
64         String JavaDoc message,
65         Throwable JavaDoc cause) {
66
67         super(sourceClass, "ID name: [" + idName + "] - " + message, cause);
68     }
69
70     /**
71      * @return SeverityEnum.INFO
72      */

73     public SeverityEnum getSeverity() {
74         return SeverityEnum.INFO;
75     }
76 }
77
Popular Tags