Mercurial > projects > dwt-linux
comparison dwt/DWTException.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | 654b7d7cc33c |
children | c0d810de7093 |
comparison
equal
deleted
inserted
replaced
237:98b80b00af79 | 238:380bad9f6852 |
---|---|
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * Port to the D programming language: | 10 * Port to the D programming language: |
11 * Frank Benoit <benoit@tionex.de> | 11 * Frank Benoit <benoit@tionex.de> |
12 *******************************************************************************/ | 12 *******************************************************************************/ |
13 module dwt.DWTException; | 13 module dwt.DWTException; |
14 | |
15 import dwt.dwthelper.utils; | |
14 | 16 |
15 import dwt.DWT; | 17 import dwt.DWT; |
16 | 18 |
17 import tango.core.Exception; | 19 import tango.core.Exception; |
18 import tango.io.Stdout; | 20 import tango.io.Stdout; |
70 * set to an unspecified value. Specifying <code>null</code> | 72 * set to an unspecified value. Specifying <code>null</code> |
71 * as the message is equivalent to specifying an empty string. | 73 * as the message is equivalent to specifying an empty string. |
72 * | 74 * |
73 * @param message the detail message for the exception | 75 * @param message the detail message for the exception |
74 */ | 76 */ |
75 public this (char[] message) { | 77 public this (String message) { |
76 this (DWT.ERROR_UNSPECIFIED, message); | 78 this (DWT.ERROR_UNSPECIFIED, message); |
77 } | 79 } |
78 | 80 |
79 /** | 81 /** |
80 * Constructs a new instance of this class with its | 82 * Constructs a new instance of this class with its |
93 * equivalent to specifying an empty string. | 95 * equivalent to specifying an empty string. |
94 * | 96 * |
95 * @param code the DWT error code | 97 * @param code the DWT error code |
96 * @param message the detail message for the exception | 98 * @param message the detail message for the exception |
97 */ | 99 */ |
98 public this (int code, char[] message) { | 100 public this (int code, String message) { |
99 super (message); | 101 super (message); |
100 this.code = code; | 102 this.code = code; |
101 } | 103 } |
102 | 104 |
103 /** | 105 /** |
122 * It is combined with the message string of the Throwable | 124 * It is combined with the message string of the Throwable |
123 * which caused this DWTException (if this information is available). | 125 * which caused this DWTException (if this information is available). |
124 * </p> | 126 * </p> |
125 * @return the error message string of this DWTException object | 127 * @return the error message string of this DWTException object |
126 */ | 128 */ |
127 public char[] getMessage () { | 129 public String getMessage () { |
128 if (throwable is null) return super.toString (); | 130 if (throwable is null) return super.toString (); |
129 return super.toString () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$ | 131 return super.toString () ~ " (" ~ throwable.toString () ~ ")"; //$NON-NLS-1$ //$NON-NLS-2$ |
130 } | 132 } |
131 | 133 |
132 /** | 134 /** |