diff options
author | Agniva De Sarker <agnivade@yahoo.co.in> | 2018-09-03 12:02:25 +0530 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-09-04 07:02:45 +0000 |
commit | e2e44a5d161d5373f8124997382dd4169c1e8a00 (patch) | |
tree | 6fcabfa430858438fdb6c3c562e67ede14c22a5f /misc/wasm | |
parent | db3f52db8edfa51c76d1e3e1a417d46b85528132 (diff) | |
download | go-e2e44a5d161d5373f8124997382dd4169c1e8a00.tar.gz go-e2e44a5d161d5373f8124997382dd4169c1e8a00.zip |
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 <neelance@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'misc/wasm')
-rw-r--r-- | misc/wasm/wasm_exec.html | 2 |
1 files changed, 2 insertions, 0 deletions
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() { |