add: }  else if (!Components.isSuccessCode(loader.request.status)) {  alert("Getting the calendar file failed.\nStatus code: 0x"+loader.request.status.toString(16)); 
context: calendarManager.prototype.getRemoteCalendarText = function calMan_getRemoteCalendarText( Channel, onResponse, onError ){   var Listener =   {      onStreamComplete: function(loader, ctxt, status, resultLength, result)      {         window.setCursor( "default" );         var retval = false;         if( typeof( result ) != "string" ) //for 1.7 compatibility             result = String.fromCharCode.apply(this, result);         var ch = Channel.QueryInterface(Components.interfaces.nsIHttpChannel);         if (!ch.requestSucceeded) {           alert("Getting the calendar file failed.\nStatus code: "+ch.responseStatus+": "+ch.responseStatusText);         }         //check to make sure its actually a calendar file, if not return.         else if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 )         {            alert( "This doesn't appear to be a valid file. Here's what I got back from\n"+Channel.URI.spec+":\nResult:"+result );         } else {             onResponse( result );             retval = true;         }         if( gNextSubNodeToRefresh )            gCalendarWindow.calendarManager.refreshAllRemoteCalendars();         return retval;      }   }   var notificationCallbacks =   {     // nsIInterfaceRequestor interface     getInterface: function(iid, instance) {       if (iid.equals(Components.interfaces.nsIAuthPrompt)) {         // use the window watcher service to get a nsIAuthPrompt impl         var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]                            .getService(Components.interfaces.nsIWindowWatcher);         return ww.getNewAuthPrompter(null);       }       Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE;       return null;     }   }   Channel.notificationCallbacks = notificationCallbacks;   var myInstance = Components.classes["@mozilla.org/network/stream-loader;1"].createInstance(Components.interfaces.nsIStreamLoader);   dump( "init channel, \nChannel is "+Channel+"\nURL is "+Channel.URI.spec+"\n" );   window.setCursor( "wait" );   myInstance.init( Channel, Listener, null );}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/a77fc7574c0730742b0887626caae8434b22aa1f/calendarManager.js/clean/calendar/resources/content/calendarManager.js