Commit e2e44a5d authored by Agniva De Sarker's avatar Agniva De Sarker Committed by Brad Fitzpatrick

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/132916Reviewed-by: 's avatarRichard Musiol <neelance@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent db3f52db
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment