aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-11-08 13:12:37 -0500
committerDave Methvin <dave.methvin@gmail.com>2011-11-08 15:52:30 -0500
commitc3600e261ba8d9394fe505ef5a0611b6d6b18a8d (patch)
tree4f302c91bce22aab879f75b247c7d74862c9cead /src
parentd8e2b4b6e43cb2de9cd1d21bc6aa1174393535ba (diff)
downloadjquery-c3600e261ba8d9394fe505ef5a0611b6d6b18a8d.tar.gz
jquery-c3600e261ba8d9394fe505ef5a0611b6d6b18a8d.zip
Take 2 on "Fix ajax to always expect an Error object, per #10646."
We can't use jQuery.error to rethrow anymore since it constructs a new Error from its supposedly-string arg. Also, older IE stringifies Error objects into "[object Error]" so I've loosened the unit test criteria. This reverts commit 586fb059190ecacd89e3cd211c78e776792d2f2b.
Diffstat (limited to 'src')
-rw-r--r--src/ajax.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ajax.js b/src/ajax.js
index bf81d3a73..fb5f08c1d 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.message );
+ done( -1, e );
// Simply rethrow otherwise
} else {
- jQuery.error( e.message );
+ throw e;
}
}
}