From 09a45f06e454e40d8fab72274a87c5b01c8387d4 Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Fri, 16 Feb 2024 20:54:06 +0000 Subject: [PATCH] globalThis[exception] is no longer a funciton, so just throw an error with the two strings --- wasm_exec.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/wasm_exec.js b/wasm_exec.js index 3cd3487..eefe5a5 100644 --- a/wasm_exec.js +++ b/wasm_exec.js @@ -460,16 +460,15 @@ }, // func Throw(exception, message unsafe.Pointer) "gitlab.com/elixxir/wasm-utils/exception.throw": (sp) => { - const exception = loadString(sp + 8) - const message = loadString(sp + 24) - throw globalThis[exception](message) + const exception = loadString(sp + 8); + const message = loadString(sp + 24); + throw new Error(exception + ": " + message); }, 'runtime.Throw': (sp) => { - const exception = loadString(sp + 8) - const message = loadString(sp + 24) - throw globalThis[exception](message) + const exception = loadString(sp + 8); + const message = loadString(sp + 24); + throw new Error(exception + ": " + message); }, - } }; this.importObject.go = this.importObject.gojs; -- GitLab