01: /*
02: * Title: Oyster Project
03: * Description: S/MIME email sending capabilities
04: * @Author Vladimir Radisic
05: * @Version 2.1.6
06: */
07:
08: package org.enhydra.oyster.exception;
09:
10: /**
11: * SMIMEException is exception which is thrown in the classes specific for SMIME
12: * and in the processes associated with SMIME. It contains messages describing
13: * appeared problems.
14: */
15: public class SMIMEException extends Exception {
16:
17: /**
18: * SMIME error number
19: */
20: int errNo = -1;
21:
22: /**
23: * Construction with the given Throwable object which is cause of SMIME Exception.
24: * @param th0 the external Exception - cause of SMIME exception.
25: */
26: public SMIMEException(Throwable th0) {
27: super (th0);
28: }
29:
30: /**
31: * Construction with the given error number.
32: * @param errNumb0 error number corresponds to appropriate error message stored
33: * in ErrorStorage class.
34: */
35: public SMIMEException(int errNumb0) {
36: super (ErrorStorage.getErrorMesage(errNumb0));
37: this .errNo = errNumb0;
38: }
39:
40: /**
41: * Construction with the given Throwable object and the appropriate error
42: * number.
43: * @param th0 the external Exception - cause of SMIME exception.
44: * @param errNumb0 error number corresponds to appropriate error message stored
45: * in ErrorStorage class.
46: */
47: public SMIMEException(Throwable th0, int errNumb0) {
48: super (ErrorStorage.getErrorMesage(errNumb0), th0);
49: this .errNo = errNumb0;
50: }
51:
52: /**
53: * Returns error number
54: * @return error number or -1 if error number is not set during construction
55: * of exception.
56: */
57: public int getErrNo() {
58: return this.errNo;
59: }
60:
61: }
|