comparison dwt/DWTException.d @ 206:cca980503056

sync with dwt-linux, removed the simple.d
author Frank Benoit <benoit@tionex.de>
date Wed, 16 Apr 2008 20:36:50 +0200
parents dc7db4338dbe
children ab60f3309436
comparison
equal deleted inserted replaced
205:6d1762e7ebb7 206:cca980503056
33 * 33 *
34 * @see DWTError 34 * @see DWTError
35 */ 35 */
36 36
37 public class DWTException : Exception { 37 public class DWTException : Exception {
38
39 /** 38 /**
40 * The DWT error code, one of DWT.ERROR_*. 39 * The DWT error code, one of DWT.ERROR_*.
41 */ 40 */
42 public int code; 41 public int code;
43 42
44 /** 43 /**
45 * The underlying throwable that caused the problem, 44 * The underlying throwable that caused the problem,
46 * or null if this information is not available. 45 * or null if this information is not available.
47 */ 46 */
48 public Exception throwable; 47 public Exception throwable( Exception e ){
48 this.next = e;
49 return this.next;
50 }
51 public Exception throwable(){
52 return this.next;
53 }
54
49 55
50 //static final long serialVersionUID = 3257282552304842547L; 56 //static final long serialVersionUID = 3257282552304842547L;
51 57
52 /** 58 /**
53 * Constructs a new instance of this class with its 59 * Constructs a new instance of this class with its
117 * which caused this DWTException (if this information is available). 123 * which caused this DWTException (if this information is available).
118 * </p> 124 * </p>
119 * @return the error message string of this DWTException object 125 * @return the error message string of this DWTException object
120 */ 126 */
121 public char[] getMessage () { 127 public char[] getMessage () {
122 if (throwable is null) 128 if (throwable is null) return super.toString ();
123 return super.toString ();
124 return super.toString () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$ 129 return super.toString () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$
125 } 130 }
126 131
127 /** 132 /**
128 * Outputs a printable representation of this exception's 133 * Outputs a printable representation of this exception's
145 } 150 }
146 } 151 }
147 152
148 } 153 }
149 154
155