Always install uncaught error handler

This commit is contained in:
Antonio Scandurra
2015-10-12 08:29:43 +02:00
parent e1a1474b8d
commit aebc1229f1
2 changed files with 2 additions and 6 deletions

View File

@@ -48,10 +48,6 @@ describe "AtomEnvironment", ->
beforeEach ->
spyOn atom, 'openDevTools'
spyOn atom, 'executeJavaScriptInDevTools'
atom.installUncaughtErrorHandler()
afterEach: ->
atom.uninstallUncaughtErrorHandler()
it "will open the dev tools when an error is triggered", ->
try

View File

@@ -193,6 +193,8 @@ class AtomEnvironment extends Model
@registerDefaultDeserializers()
@registerDefaultViewProviders()
@installUncaughtErrorHandler()
setConfigSchema: ->
@config.setSchema null, {type: 'object', properties: _.clone(require('./config-schema'))}
@@ -579,8 +581,6 @@ class AtomEnvironment extends Model
# Call this method when establishing a real application window.
startEditorWindow: ->
@installUncaughtErrorHandler()
@commandInstaller.installAtomCommand false, (error) ->
console.warn error.message if error?
@commandInstaller.installApmCommand false, (error) ->