From e2e44a5d161d5373f8124997382dd4169c1e8a00 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Mon, 3 Sep 2018 12:02:25 +0530 Subject: [PATCH] misc/wasm: handle error during instantiateStreaming The same catch block is there in wasm_exec.js for node processes. Added it in browser invocations too, to prevent uncaught exceptions. Change-Id: Icab577ec585fa86df3c76db508b49401bcdb52ae Reviewed-on: https://go-review.googlesource.com/132916 Reviewed-by: Richard Musiol Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- misc/wasm/wasm_exec.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/wasm/wasm_exec.html b/misc/wasm/wasm_exec.html index cc37ea73ce..f5e21e40f3 100644 --- a/misc/wasm/wasm_exec.html +++ b/misc/wasm/wasm_exec.html @@ -27,6 +27,8 @@ license that can be found in the LICENSE file. mod = result.module; inst = result.instance; document.getElementById("runButton").disabled = false; + }).catch((err) => { + console.error(err); }); async function run() { -- 2.50.0