Telemetry: report uncaught errors

This commit is contained in:
DC
2016-06-21 02:48:44 -07:00
parent c3686417e3
commit 1f51f35f8e
4 changed files with 25 additions and 7 deletions

View File

@@ -68,6 +68,13 @@ function init () {
// To keep app startup fast, some code is delayed.
setTimeout(delayedInit, config.DELAYED_INIT)
// Report uncaught exceptions
process.on('uncaughtException', (err) => {
console.error(err)
var errJSON = {message: err.message, stack: err.stack}
windows.main.dispatch('uncaughtError', 'main', errJSON)
})
})
app.once('ipcReady', function () {