aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core.js2
-rw-r--r--test/unit/core.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js
index 62141b986..969c7eeba 100644
--- a/src/core.js
+++ b/src/core.js
@@ -531,7 +531,7 @@ jQuery.extend({
},
error: function( msg ) {
- throw msg;
+ throw new Error( msg );
},
parseJSON: function( data ) {
diff --git a/test/unit/core.js b/test/unit/core.js
index dc909546b..24da8db6c 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -1129,7 +1129,7 @@ test("jQuery.parseXML", 4, function(){
xml = jQuery.parseXML( "<p>Not a <<b>well-formed</b> xml string</p>" );
ok( false, "invalid xml not detected" );
} catch( e ) {
- strictEqual( e, "Invalid XML: <p>Not a <<b>well-formed</b> xml string</p>", "invalid xml detected" );
+ strictEqual( e.message, "Invalid XML: <p>Not a <<b>well-formed</b> xml string</p>", "invalid xml detected" );
}
});