| 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 |
} ); |