Reworks how values of parameters passed to error callbacks are determined. Fixes #8050.

This commit is contained in:
jaubourg 2011-01-25 16:08:19 +01:00
parent 8d050558d3
commit 5ca8f0617f
3 changed files with 60 additions and 12 deletions

View file

@ -108,12 +108,9 @@ if ( jQuery.support.ajax ) {
} catch( _ ) {}
// Do send the request
try {
xhr.send( ( s.hasContent && s.data ) || null );
} catch( e ) {
complete( 0, "error", "" + e );
return;
}
// This may raise an exception which is actually
// handled in jQuery.ajax (so no try/catch here)
xhr.send( ( s.hasContent && s.data ) || null );
// Listener
callback = function( _, isAbort ) {