Skip to content

Commit 1fd5c96

Browse files
committed
Improve JS error tracking
1 parent 3b68eb0 commit 1fd5c96

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

assets/javascripts/app/app.coffee

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@app =
2-
$: $
3-
$$: $$
2+
_$: $
3+
_$$: $$
4+
_page: page
45
collections: {}
56
models: {}
67
templates: {}
@@ -53,7 +54,7 @@
5354
Raven.config @config.sentry_dsn,
5455
whitelistUrls: [/devdocs/]
5556
includePaths: [/devdocs/]
56-
ignoreErrors: [/dpQuery/, /NPObject/]
57+
ignoreErrors: [/dpQuery/, /NPObject/, /NS_ERROR/, /^null$/]
5758
tags:
5859
mode: if @DOC then 'single' else 'full'
5960
iframe: (window.top isnt window).toString()
@@ -163,6 +164,8 @@
163164
return
164165

165166
onQuotaExceeded: ->
167+
return if @quotaExceeded
168+
@quotaExceeded = true
166169
new app.views.Notif 'QuotaExceeded', autoHide: null
167170
Raven.captureMessage 'QuotaExceededError'
168171

@@ -188,7 +191,7 @@
188191
isInjectionError: ->
189192
# Some browser extensions expect the entire web to use jQuery.
190193
# I gave up trying to fight back.
191-
window.$ isnt app.$ or window.$$ isnt app.$$
194+
window.$ isnt app._$ or window.$$ isnt app._$$ or window.page isnt app._page
192195

193196
isAppError: (error, file) ->
194197
# Ignore errors from external scripts.

0 commit comments

Comments
 (0)