mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Assign atom.lastUncaughtError in window.onerror handler
This commit is contained in:
@@ -111,6 +111,7 @@ class Atom extends Model
|
||||
remote.getCurrentWindow()
|
||||
|
||||
workspaceViewParentSelector: 'body'
|
||||
lastUncaughtError: null
|
||||
|
||||
# Call .loadOrCreate instead
|
||||
constructor: (@state) ->
|
||||
@@ -125,6 +126,7 @@ class Atom extends Model
|
||||
window.onerror = =>
|
||||
@openDevTools()
|
||||
@executeJavaScriptInDevTools('InspectorFrontendAPI.showConsole()')
|
||||
@lastUncaughtError = Array::slice.call(arguments)
|
||||
@emit 'uncaught-error', arguments...
|
||||
|
||||
@unsubscribe()
|
||||
|
||||
Reference in New Issue
Block a user