rem: function errorToString( err ) 
add: function errorToString(err) 
context: function errorToString( err ){    if (typeof(err) == "string")        return err;    if (err instanceof Error)        return err.message;    if (err instanceof Components.interfaces.nsIException)        return err.toString(); // xxx todo: or just message?    // numeric codes:    switch (err) {    case Components.results.NS_ERROR_INVALID_ARG:        return "NS_ERROR_INVALID_ARG";    case Components.results.NS_ERROR_NO_INTERFACE:        return "NS_ERROR_NO_INTERFACE";    case Components.results.NS_ERROR_NOT_IMPLEMENTED:        return "NS_ERROR_NOT_IMPLEMENTED";    case Components.results.NS_ERROR_FAILURE:        return "NS_ERROR_FAILURE";    default:        if (isNaN(err))            return ("[" + err + "] Unknown error.");        // probe for WCAP error:        try {            return wcapErrorToString(err);        }        catch (exc) { // probe for netwerk error:            try {                return netErrorToString(err);            }            catch (exc) {                return ("[0x" + err.toString(16) + "] Unknown error.");            }        }    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/5f32e44ee9e35bc03083914348887f8453206bf7/calWcapErrors.js/clean/calendar/providers/wcap/calWcapErrors.js