diff --git a/core/src/main/resources/org/teavm/backend/javascript/runtime.js b/core/src/main/resources/org/teavm/backend/javascript/runtime.js index 68ff3c7e3..943134bec 100644 --- a/core/src/main/resources/org/teavm/backend/javascript/runtime.js +++ b/core/src/main/resources/org/teavm/backend/javascript/runtime.js @@ -650,7 +650,7 @@ if (typeof Reflect === 'object') { value: JavaError }, message: { - get: () => { + get() { try { let javaException = this[$rt_javaExceptionProp]; if (typeof javaException === 'object') { diff --git a/tools/junit/src/main/java/org/teavm/junit/TestJsEntryPoint.java b/tools/junit/src/main/java/org/teavm/junit/TestJsEntryPoint.java index 6b3c8eb0d..156d66f3e 100644 --- a/tools/junit/src/main/java/org/teavm/junit/TestJsEntryPoint.java +++ b/tools/junit/src/main/java/org/teavm/junit/TestJsEntryPoint.java @@ -52,6 +52,6 @@ final class TestJsEntryPoint { } } - @JSBody(params = "e", script = "teavmException = e") + @JSBody(params = "e", script = "window.teavmException = e") private static native void saveJavaException(String e); }