KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > za > org > coefficient > exception > ConfigurationException


1 /*
2  * Coefficient - facilitates project based collaboration
3  * Copyright (C) 2003, Dylan Etkin, CSIR icomtek
4  * PO Box 395
5  * Pretoria 0001, RSA
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19
20 package za.org.coefficient.exception;
21
22
23 /**
24  * DOCUMENT ME!
25  *
26  * @author $author$
27  * @version $Revision: 1.1.1.1 $
28  */

29 public class ConfigurationException extends RuntimeException JavaDoc {
30     //~ Instance fields ========================================================
31

32     private Throwable JavaDoc th;
33
34     //~ Constructors ===========================================================
35

36     public ConfigurationException(String JavaDoc msg) {
37         super(msg);
38     }
39
40     public ConfigurationException(Throwable JavaDoc t) {
41         this.th = t;
42     }
43
44     public ConfigurationException(String JavaDoc msg, Throwable JavaDoc t) {
45         super(msg);
46         this.th = t;
47     }
48
49     protected ConfigurationException() {
50     }
51
52     //~ Methods ================================================================
53

54     public Throwable JavaDoc getRootCause() {
55         if (th != null) {
56             return th;
57         } else {
58             return this;
59         }
60     }
61 }
62
Popular Tags