01: package org.jgroups.persistence;
02:
03: /**
04: * @author Mandar Shinde
05: * This exception inherits the Exception class and is used in
06: * cases where the Persistence Storage cannot be connected to
07: * for any purpose.
08: */
09:
10: public class CannotConnectException extends Exception {
11:
12: /**
13: * @param t
14: * @param reason implementor-specified runtime reason
15: */
16: public CannotConnectException(Exception t, String reason) {
17: this .t = t;
18: this .reason = reason;
19: }
20:
21: /**
22: * @param t
23: * @param reason implementor-specified runtime reason
24: */
25: public CannotConnectException(Throwable t, String reason) {
26: this .t = t;
27: this .reason = reason;
28: }
29:
30: /**
31: * @return String;
32: */
33: public String toString() {
34: String tmp = "Exception " + t.toString()
35: + " was thrown due to " + reason;
36: return tmp;
37: }
38:
39: /**
40: * members are made available so that the top level user can dump
41: * appropriate members on to his stack trace
42: */
43: public Throwable t = null;
44: public String reason = null;
45: }
|