X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=d0c6752788db5d7b68a657241ab354716cb14030;hb=ca90ffb332eafc93b8107aeb2afa7473132392fd;hp=4af502a9780b510b66b665973d06905e232648b6;hpb=bed759c95ca6d796125653b540e8611dc63b38bb;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 4af502a..d0c6752 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -417,13 +417,16 @@ jQuery.extend({ "notmodified" : "success"; + var errMsg; + if ( status === "success" ) { // Watch for, and catch, XML document parse errors try { // process the data (runs the xml through httpData regardless of callback) data = jQuery.httpData( xhr, s.dataType, s ); - } catch(e) { + } catch(err) { status = "parsererror"; + errMsg = err; } } @@ -434,7 +437,7 @@ jQuery.extend({ success(); } } else { - jQuery.handleError(s, xhr, status); + jQuery.handleError(s, xhr, status, errMsg); } // Fire the complete handlers