diff options
Diffstat (limited to 'vm')
-rw-r--r-- | vm/reference/java/lang/Throwable.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vm/reference/java/lang/Throwable.java b/vm/reference/java/lang/Throwable.java index 16a24e07e..ff5db43ea 100644 --- a/vm/reference/java/lang/Throwable.java +++ b/vm/reference/java/lang/Throwable.java @@ -258,17 +258,17 @@ public class Throwable extends Object implements Serializable } /** - * Get a human-readable representation of this Throwable. With a null - * detail message, this string is simply the object's class name. With - * a detail message, the string is - * <code>getClass().getName() + ": " + getMessage()</code>. + * Get a human-readable representation of this Throwable. The detail message + * is retrieved by getLocalizedMessage(). Then, with a null detail + * message, this string is simply the object's class name; otherwise + * the string is <code>getClass().getName() + ": " + message</code>. * * @return a human-readable String represting this Throwable */ public String toString() { - return getClass().getName() - + (detailMessage == null ? "" : ": " + detailMessage); + String msg = getLocalizedMessage(); + return getClass().getName() + (msg == null ? "" : ": " + msg); } /** |