aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets
diff options
context:
space:
mode:
Diffstat (limited to 'targets')
-rw-r--r--targets/wasm_exec.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/targets/wasm_exec.js b/targets/wasm_exec.js
index 4c8790667..50381fa92 100644
--- a/targets/wasm_exec.js
+++ b/targets/wasm_exec.js
@@ -479,7 +479,7 @@
!global.process.versions.electron
) {
if (process.argv.length != 3) {
- process.stderr.write("usage: go_js_wasm_exec [wasm binary] [arguments]\n");
+ console.error("usage: go_js_wasm_exec [wasm binary] [arguments]");
process.exit(1);
}
@@ -487,7 +487,8 @@
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
return go.run(result.instance);
}).catch((err) => {
- throw err;
+ console.error(err);
+ process.exit(1);
});
}
})();