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 @@
1@app =1@app =
2 $: $2 _$: $
3 $$: $$3 _$$: $$
4 _page: page
4 collections: {}5 collections: {}
5 models: {}6 models: {}
6 templates: {}7 templates: {}
@@ -53,7 +54,7 @@ · 46 unmodified lines
53 Raven.config @config.sentry_dsn,54 Raven.config @config.sentry_dsn,
54 whitelistUrls: [/devdocs/]55 whitelistUrls: [/devdocs/]
55 includePaths: [/devdocs/]56 includePaths: [/devdocs/]
56 ignoreErrors: [/dpQuery/, /NPObject/]57 ignoreErrors: [/dpQuery/, /NPObject/, /NS_ERROR/, /^null$/]
57 tags:58 tags:
58 mode: if @DOC then 'single' else 'full'59 mode: if @DOC then 'single' else 'full'
59 iframe: (window.top isnt window).toString()60 iframe: (window.top isnt window).toString()
@@ -163,6 +164,8 @@ · 103 unmodified lines
163 return164 return
164 165
165 onQuotaExceeded: ->166 onQuotaExceeded: ->
167 return if @quotaExceeded
168 @quotaExceeded = true
166 new app.views.Notif 'QuotaExceeded', autoHide: null169 new app.views.Notif 'QuotaExceeded', autoHide: null
167 Raven.captureMessage 'QuotaExceededError'170 Raven.captureMessage 'QuotaExceededError'
168 171
@@ -188,7 +191,7 @@ · 19 unmodified lines
188 isInjectionError: ->191 isInjectionError: ->
189 # Some browser extensions expect the entire web to use jQuery.192 # Some browser extensions expect the entire web to use jQuery.
190 # I gave up trying to fight back.193 # 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
192 195
193 isAppError: (error, file) ->196 isAppError: (error, file) ->
194 # Ignore errors from external scripts.197 # 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