aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library_browser.js1
-rw-r--r--src/postamble.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index cba8ecdf..dd60a581 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -749,6 +749,7 @@ mergeInto(LibraryManager.library, {
if (e instanceof ExitStatus) {
return;
} else {
+ if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]);
throw e;
}
}
diff --git a/src/postamble.js b/src/postamble.js
index cd892733..62edeeb6 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 {