diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-07-10 11:05:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-10 11:05:14 -0700 |
commit | 5ccfbacb8914bd220d67c95f9e9310c872eb987f (patch) | |
tree | 6f6cd08a86c0aae85bd1838b1f465822063b2598 /test/binaryen.js/fatal.js | |
parent | 14ea9995281718b9694db4ed5441d44d1171e86f (diff) | |
download | binaryen-5ccfbacb8914bd220d67c95f9e9310c872eb987f.tar.gz binaryen-5ccfbacb8914bd220d67c95f9e9310c872eb987f.tar.bz2 binaryen-5ccfbacb8914bd220d67c95f9e9310c872eb987f.zip |
Proper error handling in add* and get* methods (#1570)
See #1479 (comment)
Also a one-line readme update, remove an obsolete compiler (mir2wasm) and add a new one (asterius).
Also improve warning and error reporting in binaryen.js - show a stack trace when relevant (instead of node.js process.exit), and avoid atexit warning spam in debug builds.
Diffstat (limited to 'test/binaryen.js/fatal.js')
-rw-r--r-- | test/binaryen.js/fatal.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/binaryen.js/fatal.js b/test/binaryen.js/fatal.js new file mode 100644 index 000000000..5e8071daa --- /dev/null +++ b/test/binaryen.js/fatal.js @@ -0,0 +1,4 @@ +var wasm = new Binaryen.Module() +wasm.addFunctionType("vI", Binaryen.i32, []); +// It will cause a fatal error to try to add the same name a second time +wasm.addFunctionType("vI", Binaryen.i32, []); |