blob: 6dbdc85208ce58d9d36a28a90a91c7a7f9857379 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001define( [
2 "../core",
3 "../deferred"
4], function( jQuery ) {
5
6"use strict";
7
8// These usually indicate a programmer mistake during development,
9// warn about them ASAP rather than swallowing them by default.
10var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
11
12jQuery.Deferred.exceptionHook = function( error, stack ) {
13
14 // Support: IE 8 - 9 only
15 // Console exists when dev tools are open, which can happen at any time
16 if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
17 window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
18 }
19};
20
21} );