/* This object is thrown when network failures occur */
-function NetworkFailure(stat) { this._status = stat; }
+function NetworkFailure(stat, url) {
+ this._status = stat;
+ this._url = url;
+}
+
NetworkFailure.prototype.status = function() { return this._status; }
+NetworkFailure.prototype.url = function() { return this._url; }
NetworkFailure.prototype.toString = function() {
- return "Network Failure: status = " + this.status();
+ return "Network Failure: status = " + this.status() +'\n'+this.url();
}
if( failed ) {
if(!status) status = '<unknown>';
try{dump('! NETWORK FAILURE. HTTP STATUS = ' +status);}catch(e){}
- throw new NetworkFailure(status);
+ if(isXUL())
+ throw new NetworkFailure(status, this.param_string);
+ else return null;
}