summaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/postamble.js b/src/postamble.js
index cd892733..d64fb220 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -96,6 +96,7 @@ Module['callMain'] = Module.callMain = function callMain(args) {
Module['noExitRuntime'] = true;
return;
} else {
+ if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]);
throw e;
}
} finally {
@@ -179,7 +180,7 @@ function abort(text) {
ABORT = true;
EXITSTATUS = 1;
- throw 'abort() at ' + (new Error().stack);
+ throw 'abort() at ' + stackTrace();
}
Module['abort'] = Module.abort = abort;