From e2a00ea9d0450f250ef8eaf27adf3b23111f6575 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 11 Dec 2015 23:01:45 -0500 Subject: better aborts --- src/s2wasm.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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"); } } -- cgit v1.2.3