Mercurial > nebulaweb3
comparison default/node_modules/jquery/src/deferred/exceptionHook.js @ 0:1d038bc9b3d2 default tip
Up:default
author | Liny <dev@neowd.com> |
---|---|
date | Sat, 31 May 2025 09:21:51 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1d038bc9b3d2 |
---|---|
1 define( [ | |
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. | |
10 var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; | |
11 | |
12 jQuery.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 } ); |