Show uncaught exception in message dialog.
This commit is contained in:
parent
c6ce3b789b
commit
02c5ad16f3
1 changed files with 7 additions and 3 deletions
|
@ -26,10 +26,14 @@ globalPaths.push path.join(__dirname, '..', '..', 'common', 'api', 'lib')
|
||||||
|
|
||||||
# Don't quit on fatal error.
|
# Don't quit on fatal error.
|
||||||
process.on 'uncaughtException', (error) ->
|
process.on 'uncaughtException', (error) ->
|
||||||
# TODO Show error in GUI.
|
# Show error in GUI.
|
||||||
message = error.stack ? "#{error.name}: #{error.message}"
|
message = error.stack ? "#{error.name}: #{error.message}"
|
||||||
console.error 'uncaughtException:'
|
require('dialog').showMessageBox
|
||||||
console.error message
|
type: 'warning'
|
||||||
|
title: 'An javascript error occured in the browser'
|
||||||
|
message: 'uncaughtException'
|
||||||
|
detail: message
|
||||||
|
buttons: ['OK']
|
||||||
|
|
||||||
# Load the RPC server.
|
# Load the RPC server.
|
||||||
require './rpc-server.js'
|
require './rpc-server.js'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue