initial commit
This commit is contained in:
25
public/scripts/jquery/src/deferred/exceptionHook.js
vendored
Normal file
25
public/scripts/jquery/src/deferred/exceptionHook.js
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../deferred"
|
||||
], function( jQuery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// These usually indicate a programmer mistake during development,
|
||||
// warn about them ASAP rather than swallowing them by default.
|
||||
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
||||
|
||||
// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
|
||||
// captured before the async barrier to get the original error cause
|
||||
// which may otherwise be hidden.
|
||||
jQuery.Deferred.exceptionHook = function( error, asyncError ) {
|
||||
|
||||
// Support: IE 8 - 9 only
|
||||
// Console exists when dev tools are open, which can happen at any time
|
||||
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
||||
window.console.warn( "jQuery.Deferred exception: " + error.message,
|
||||
error.stack, asyncError );
|
||||
}
|
||||
};
|
||||
|
||||
} );
|
Reference in New Issue
Block a user