From d815147df6794859e85a1627506b6039cebf60a2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 10 Oct 2013 11:01:24 -0700 Subject: [PATCH] Log uncaught exceptions in browser process --- src/browser/main.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/browser/main.coffee b/src/browser/main.coffee index 37b3d817f..079fa6a93 100644 --- a/src/browser/main.coffee +++ b/src/browser/main.coffee @@ -14,6 +14,10 @@ dialog = require 'dialog' console.log = (args...) -> nslog(args.map((arg) -> JSON.stringify(arg)).join(" ")) +process.on 'uncaughtException', (error={}) -> + nslog(error.message) if error.message? + nslog(error.stack) if error.stack? + delegate.browserMainParts.preMainMessageLoopRun = -> args = parseCommandLine()