Improve JS error tracking

pull/303/merge
Thibaut 9 years ago
parent 3b68eb02e9
commit 1fd5c96f82

@ -1,6 +1,7 @@
@app = @app =
$: $ _$: $
$$: $$ _$$: $$
_page: page
collections: {} collections: {}
models: {} models: {}
templates: {} templates: {}
@ -53,7 +54,7 @@
Raven.config @config.sentry_dsn, Raven.config @config.sentry_dsn,
whitelistUrls: [/devdocs/] whitelistUrls: [/devdocs/]
includePaths: [/devdocs/] includePaths: [/devdocs/]
ignoreErrors: [/dpQuery/, /NPObject/] ignoreErrors: [/dpQuery/, /NPObject/, /NS_ERROR/, /^null$/]
tags: tags:
mode: if @DOC then 'single' else 'full' mode: if @DOC then 'single' else 'full'
iframe: (window.top isnt window).toString() iframe: (window.top isnt window).toString()
@ -163,6 +164,8 @@
return return
onQuotaExceeded: -> onQuotaExceeded: ->
return if @quotaExceeded
@quotaExceeded = true
new app.views.Notif 'QuotaExceeded', autoHide: null new app.views.Notif 'QuotaExceeded', autoHide: null
Raven.captureMessage 'QuotaExceededError' Raven.captureMessage 'QuotaExceededError'
@ -188,7 +191,7 @@
isInjectionError: -> isInjectionError: ->
# Some browser extensions expect the entire web to use jQuery. # Some browser extensions expect the entire web to use jQuery.
# I gave up trying to fight back. # I gave up trying to fight back.
window.$ isnt app.$ or window.$$ isnt app.$$ window.$ isnt app._$ or window.$$ isnt app._$$ or window.page isnt app._page
isAppError: (error, file) -> isAppError: (error, file) ->
# Ignore errors from external scripts. # Ignore errors from external scripts.

Loading…
Cancel
Save