1.1 --- a/rt/emul/mini/src/main/java/java/lang/Throwable.java Thu Jan 09 16:38:15 2014 +0100
1.2 +++ b/rt/emul/mini/src/main/java/java/lang/Throwable.java Thu Jan 09 17:22:41 2014 +0100
1.3 @@ -638,8 +638,11 @@
1.4 * ... 2 more
1.5 * </pre>
1.6 */
1.7 - @JavaScriptBody(args = { }, body = "console.warn(this.toString());")
1.8 - public native void printStackTrace();
1.9 + public void printStackTrace() {
1.10 + warn(getClass().getName() + ": " + getMessage());
1.11 + }
1.12 + @JavaScriptBody(args = { "msg" }, body = "if (console) console.warn(msg.toString());")
1.13 + private native void warn(String msg);
1.14
1.15 /**
1.16 * Prints this throwable and its backtrace to the specified print stream.