1.1 --- a/src/test/java/org/apidesign/java4browser/StaticMethodTest.java Thu Sep 20 14:35:21 2012 +0200
1.2 +++ b/src/test/java/org/apidesign/java4browser/StaticMethodTest.java Fri Sep 21 10:14:25 2012 +0200
1.3 @@ -176,7 +176,16 @@
1.4 }
1.5 InputStream is = StaticMethodTest.class.getClassLoader().getResourceAsStream(name + ".class");
1.6 assertNotNull(is, "Class file found");
1.7 - ByteCodeToJavaScript.compile(is, sb, toProcess);
1.8 + try {
1.9 + ByteCodeToJavaScript.compile(is, sb, toProcess);
1.10 + } catch (RuntimeException ex) {
1.11 + int lastBlock = sb.lastIndexOf("{");
1.12 + throw new IllegalStateException(
1.13 + "Error while compiling " + name + "\n" +
1.14 + sb.substring(lastBlock + 1, sb.length()),
1.15 + ex
1.16 + );
1.17 + }
1.18 }
1.19 ScriptEngineManager sem = new ScriptEngineManager();
1.20 ScriptEngine js = sem.getEngineByExtension("js");