rem: throw new Error("no ical data!"); 
add: throw new Error("empty VCALENDAR returned!"); 
context: calWcapCalendar.prototype.adoptItem_resp = function( wcapResponse, iListener ){    var item = null;    try {        var icalRootComp = wcapResponse.data; // first statement, may throw                var items = this.parseItems(            icalRootComp,            Components.interfaces.calICalendar.ITEM_FILTER_ALL_ITEMS,            0, null, null );        if (items.length < 1)            throw new Error("no ical data!");        if (items.length > 1)            this.notifyError( "unexpected number of items: " + items.length );        item = items[0];        this.log( "item.id=" + item.id );                if (iListener != null) {            iListener.onOperationComplete(                this.superCalendar, Components.results.NS_OK,                Components.interfaces.calIOperationListener.ADD,                item.id, item );        }        this.notifyObservers( "onAddItem", [item] );        // xxx todo: maybe log request status    }    catch (exc) {        if (iListener != null) {            iListener.onOperationComplete(                this.superCalendar, Components.results.NS_ERROR_FAILURE,                Components.interfaces.calIOperationListener.ADD,                item == null ? null : item.id, exc );        }        this.notifyError( exc );    }};
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/318a30b964defb311d9cf0464a3354a583a7e8f0/calWcapCalendarItems.js/buggy/calendar/providers/wcap/calWcapCalendarItems.js