mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #10646. Throw an Error object from .error()
for IE's sake.
This commit is contained in:
parent
795583d293
commit
8d2655d20c
@ -531,7 +531,7 @@ jQuery.extend({
|
||||
},
|
||||
|
||||
error: function( msg ) {
|
||||
throw msg;
|
||||
throw new Error( msg );
|
||||
},
|
||||
|
||||
parseJSON: function( data ) {
|
||||
|
@ -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" );
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user