diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-12-11 23:01:45 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-12-11 23:01:45 -0500 |
commit | e2a00ea9d0450f250ef8eaf27adf3b23111f6575 (patch) | |
tree | c7cb0d3d32450e0e7098e446e0d9d41694f79bf0 /src | |
parent | 17b16f075fd0c70d5f809712967ecd869bb6b525 (diff) | |
download | binaryen-e2a00ea9d0450f250ef8eaf27adf3b23111f6575.tar.gz binaryen-e2a00ea9d0450f250ef8eaf27adf3b23111f6575.tar.bz2 binaryen-e2a00ea9d0450f250ef8eaf27adf3b23111f6575.zip |
better aborts
Diffstat (limited to 'src')
-rw-r--r-- | src/s2wasm.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index 57982f857..cd06d5ec1 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -73,11 +73,6 @@ private: assert(matched); } - #define abort_on(why) { \ - printf("%s : %20s\n", why, s); \ - abort(); \ - } - void dump(const char *text) { std::cerr << "[[" << text << "]]:\n==========\n"; for (size_t i = 0; i < 60; i++) { @@ -87,6 +82,11 @@ private: std::cerr << "\n==========\n"; } + #define abort_on(why) { \ + dump(why ":"); \ + abort(); \ + } + void unget(Name str) { s -= strlen(str.str); } @@ -172,7 +172,7 @@ private: s++; if (match("text")) parseText(); else if (match("type")) parseType(); - else abort_on(s); + else abort_on("process"); } } |