History

Improve JS error tracking

Thibaut committed 10 years ago

Commit 1fd5c961 parent 3b68eb01 file · +7 −4Browse files

Unified · Split

assets/javascripts/app/app.coffee+7−4
@@ -1,6 +1,7 @@
11 @app =
2− $: $
3− $$: $$
2+ _$: $
3+ _$$: $$
4+ _page: page
45 collections: {}
56 models: {}
67 templates: {}
@@ -53,7 +54,7 @@ · 46 unmodified lines
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 @@ · 103 unmodified lines
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 @@ · 19 unmodified lines
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.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t