PDA

View Full Version : Ajax request timeout throw Exception



cyrilluce
7 Apr 2010, 7:59 PM
When an ajax request had configure with 'timeout', if the time exceed then Firefox will throw an exception:

uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://***.***.***/ext/adapter/jquery/ext-jquery-adapter-debug.js :: anonymous :: line 2134" data: no]

(and in IE also report an error.)



return {
responseText: xhr.responseText,
responseXML : xhr.responseXML,
argument: cb.argument,
status: xhr.status, // <-- here
statusText: xhr.statusText,
getResponseHeader : function(header){return headerObj[header.toLowerCase()];},
getAllResponseHeaders : function(){return headerStr}
};


Because this will break the program, skip execute the code behind, and make all mass.

My ext version is 3.1.0, but I have read the source code of 3.2.0, this issue remains.

Is any way to avoid this?
thanks