258 |
} |
} |
259 |
|
|
260 |
/** |
/** |
261 |
* Get a human-readable representation of this Throwable. With a null |
* Get a human-readable representation of this Throwable. The detail message |
262 |
* detail message, this string is simply the object's class name. With |
* is retrieved by getLocalizedMessage(). Then, with a null detail |
263 |
* a detail message, the string is |
* message, this string is simply the object's class name; otherwise |
264 |
* <code>getClass().getName() + ": " + getMessage()</code>. |
* the string is <code>getClass().getName() + ": " + message</code>. |
265 |
* |
* |
266 |
* @return a human-readable String represting this Throwable |
* @return a human-readable String represting this Throwable |
267 |
*/ |
*/ |
268 |
public String toString() |
public String toString() |
269 |
{ |
{ |
270 |
return getClass().getName() |
String msg = getLocalizedMessage(); |
271 |
+ (detailMessage == null ? "" : ": " + detailMessage); |
return getClass().getName() + (msg == null ? "" : ": " + msg); |
272 |
} |
} |
273 |
|
|
274 |
/** |
/** |