Merge pull request #1367 from atom/cj-error-event

Add error event to atom global
This commit is contained in:
Corey Johnson
2014-01-08 11:17:04 -08:00
2 changed files with 4 additions and 3 deletions

View File

@@ -123,6 +123,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 'uncaught-error', arguments...
@unsubscribe()
@setBodyPlatformClass()

View File

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