Fix ajax to always expect an Error object, per #10646.

This commit is contained in:
Dave Methvin 2011-11-08 09:42:08 -05:00
parent f8eba6ee25
commit 586fb05919

View File

@ -752,10 +752,10 @@ jQuery.extend({
} catch (e) {
// Propagate exception as error if not done
if ( state < 2 ) {
done( -1, e );
done( -1, e.message );
// Simply rethrow otherwise
} else {
jQuery.error( e );
jQuery.error( e.message );
}
}
}