summaryrefslogtreecommitdiff
path: root/src/tools/wasm-dis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm-dis.cpp')
-rw-r--r--src/tools/wasm-dis.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/wasm-dis.cpp b/src/tools/wasm-dis.cpp
index e8ca71528..f9f303359 100644
--- a/src/tools/wasm-dis.cpp
+++ b/src/tools/wasm-dis.cpp
@@ -70,7 +70,12 @@ int main(int argc, const char* argv[]) {
} catch (ParseException& p) {
p.dump(std::cerr);
std::cerr << '\n';
- Fatal() << "error in parsing wasm binary";
+ if (options.debug) {
+ Fatal() << "error parsing wasm. here is what we read up to the error:\n"
+ << wasm;
+ } else {
+ Fatal() << "error parsing wasm (try --debug for more info)";
+ }
} catch (MapParseException& p) {
p.dump(std::cerr);
std::cerr << '\n';