1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/Exceptions.java Mon Dec 31 17:50:27 2012 +0100
1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/Exceptions.java Mon Feb 25 19:00:08 2013 +0100
1.3 @@ -17,6 +17,8 @@
1.4 */
1.5 package org.apidesign.vm4brwsr;
1.6
1.7 +import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.8 +
1.9 /**
1.10 *
1.11 * @author tom
1.12 @@ -47,6 +49,18 @@
1.13 //join point
1.14 return res;
1.15 }
1.16 +
1.17 + @JavaScriptBody(args = "msg", body = "throw msg;")
1.18 + public static void thrw(String msg) {}
1.19 +
1.20 + public static String catchThrowableCatchesAll() {
1.21 + try {
1.22 + thrw("Hello!");
1.23 + return "Not here!";
1.24 + } catch (Throwable ex) {
1.25 + return ex.getMessage();
1.26 + }
1.27 + }
1.28
1.29 public static String newInstance(String n) {
1.30 try {