mirror of
https://github.com/electron/electron.git
synced 2026-01-24 14:57:58 -05:00
Don't popup error if the user has a custom uncaught exception handler
Fix #1012.
This commit is contained in:
@@ -44,6 +44,10 @@ process.once 'BIND_DONE', ->
|
||||
|
||||
# Don't quit on fatal error.
|
||||
process.on 'uncaughtException', (error) ->
|
||||
# Do nothing if the user has a custom uncaught exception handler.
|
||||
if process.listeners('uncaughtException').length > 1
|
||||
return
|
||||
|
||||
# Show error in GUI.
|
||||
stack = error.stack ? "#{error.name}: #{error.message}"
|
||||
message = "Uncaught Exception:\n#{stack}"
|
||||
|
||||
Reference in New Issue
Block a user