KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > persistence > CannotConnectException


1 package org.jgroups.persistence;
2
3 /**
4  * @author Mandar Shinde
5  * This exception inherits the Exception class and is used in
6  * cases where the Persistence Storage cannot be connected to
7  * for any purpose.
8  */

9
10
11 public class CannotConnectException extends Exception JavaDoc
12 {
13
14     /**
15      * @param Exception;
16      * @param String; implementor filling in runtime reason
17      */

18     public CannotConnectException(Exception JavaDoc t, String JavaDoc reason)
19     {
20     this.t = t;
21     this.reason = reason;
22     }
23
24     /**
25      * @param Throwable;
26      * @param String; implementor filling in runtime reason
27      */

28     public CannotConnectException(Throwable JavaDoc t, String JavaDoc reason)
29     {
30     this.t = t;
31     this.reason = reason;
32     }
33
34     /**
35      * @return String;
36      */

37     public String JavaDoc toString()
38     {
39     String JavaDoc tmp = "Exception " + t.toString() + " was thrown due to " + reason;
40     return tmp;
41     }
42
43     /**
44      * members are made available so that the top level user can dump
45      * appropriate members on to his stack trace
46      */

47     public Throwable JavaDoc t = null;
48     public String JavaDoc reason = null;
49 }
50
Popular Tags