mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge pull request #1367 from atom/cj-error-event
Add error event to atom global
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
window.onerror = ->
|
||||
atom.openDevTools()
|
||||
|
||||
# Public: Measure how long a function takes to run.
|
||||
#
|
||||
# * description:
|
||||
|
||||
Reference in New Issue
Block a user