From: Agniva De Sarker Date: Mon, 3 Sep 2018 06:32:25 +0000 (+0530) Subject: misc/wasm: handle error during instantiateStreaming X-Git-Tag: go1.12beta1~1176 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e2e44a5d161d5373f8124997382dd4169c1e8a00;p=gostls13.git 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 --- 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() {