From 586fb059190ecacd89e3cd211c78e776792d2f2b Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Tue, 8 Nov 2011 09:42:08 -0500 Subject: [PATCH] Fix ajax to always expect an Error object, per #10646. --- src/ajax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ajax.js b/src/ajax.js index cfd43d991..bf81d3a73 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -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 ); } } }