X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=502f00653f4c5e53ed13d28dc8022afc24664ee0;hb=a6ef036bb6a3610431471eebc2623bf8ad06bdd6;hp=f1de0f8c52d93c31c941794364f991624ee32be8;hpb=3e286440d55749382a644ea97b4f0b2587779d65;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index f1de0f8..502f006 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -578,7 +578,7 @@ jQuery.extend({ data = xml ? xhr.responseXML : xhr.responseText; if ( xml && data.documentElement.nodeName === "parsererror" ) { - throw "parsererror"; + jQuery.error( "parsererror" ); } // Allow a pre-filtering function to sanitize the response @@ -606,7 +606,7 @@ jQuery.extend({ } } else { - throw "Invalid JSON: " + data; + jQuery.error( "Invalid JSON: " + data ); } // If the type is "script", eval it in global context