| 4205 | // In this case, we will only suppress further error handling if the |
| 4206 | // "ignoreGlobalErrors" configuration option is enabled. |
| 4207 | function onError(error) { |
| 4208 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { |
| 4209 | args[_key - 1] = arguments[_key]; |
| 4210 | } |
| 4211 | |
| 4212 | if (config.current) { |
| 4213 | if (config.current.ignoreGlobalErrors) { |
| 4214 | return true; |
| 4215 | } |
| 4216 | pushFailure.apply(undefined, [error.message, error.stacktrace || error.fileName + ":" + error.lineNumber].concat(args)); |
| 4217 | } else { |
| 4218 | test("global failure", extend(function () { |
| 4219 | pushFailure.apply(undefined, [error.message, error.stacktrace || error.fileName + ":" + error.lineNumber].concat(args)); |
| 4220 | }, { validTest: true })); |
| 4221 | } |
| 4222 | |
| 4223 | return false; |
| 4224 | } |
| 4225 | |
| 4226 | // Handle an unhandled rejection |
| 4227 | function onUnhandledRejection(reason) { |