Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

show error stack in console on uncaught exceptions #432

Merged
merged 1 commit into from
Apr 17, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions appshell/node-core/Launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ maxerr: 50, node: true */
*/
function uncaughtExceptionHandler() {
var args = Array.prototype.slice.call(arguments, 0);
args = args.map(function (arg) {
return arg instanceof Error ? arg.stack : arg;
});
args.unshift("[Launcher] uncaught exception at top level, exiting.");
Logger.error.apply(null, args);
exit();
Expand Down