From: Cheng Zhao Date: Mon, 19 Jan 2015 20:48:49 +0000 (-0800) Subject: Don't popup error if the user has a custom uncaught exception handler X-Git-Tag: v0.20.7~6 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=fe78c17ea6a2a37f8a9f74eca9b82e89dd290ec8;p=electron.git Don't popup error if the user has a custom uncaught exception handler Fix #1012. --- diff --git a/atom/browser/lib/init.coffee b/atom/browser/lib/init.coffee index d3234db7..65b7e4a1 100644 --- a/atom/browser/lib/init.coffee +++ b/atom/browser/lib/init.coffee @@ -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}"