mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 13:49:00 +02:00
Merge pull request #1169 from sharelatex/pr-ignore-unhandled-rejection-error
Ignore unhandled rejection error globally GitOrigin-RevId: 29574973e78f44caeb965b70b3dc43681275e05d
This commit is contained in:
committed by
sharelatex
parent
c20a506f0e
commit
80dde39e56
@@ -11,6 +11,7 @@
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
const app = angular.module('ErrorCatcher', [])
|
||||
const UNHANDLED_REJECTION_ERR_MSG = 'Possibly unhandled rejection: canceled'
|
||||
|
||||
app.config([
|
||||
'$provide',
|
||||
@@ -20,6 +21,12 @@ app.config([
|
||||
'$delegate',
|
||||
($log, $delegate) =>
|
||||
function(exception, cause) {
|
||||
if (
|
||||
exception === UNHANDLED_REJECTION_ERR_MSG &&
|
||||
cause === undefined
|
||||
) {
|
||||
return
|
||||
}
|
||||
if (
|
||||
(typeof Raven !== 'undefined' && Raven !== null
|
||||
? Raven.captureException
|
||||
|
||||
Reference in New Issue
Block a user