Add error event to atom global

This commit is contained in:
probablycorey
2014-01-06 16:11:39 -08:00
parent 98b5a400e6
commit 5975884a0e
2 changed files with 4 additions and 3 deletions

View File

@@ -127,6 +127,10 @@ class Atom extends Model
# (both spec and application). Call after this instance has been assigned to
# the `atom` global.
initialize: ->
window.onerror = =>
@openDevTools()
@emit 'error', arguments
@unsubscribe()
@setBodyPlatformClass()

View File

@@ -1,6 +1,3 @@
window.onerror = ->
atom.openDevTools()
# Public: Measure how long a function takes to run.
#
# * description: