Log uncaught exceptions in browser process

This commit is contained in:
Kevin Sawicki
2013-10-10 11:01:24 -07:00
parent d7836f6082
commit d815147df6

View File

@@ -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()