LOG(("ErrorAccordingToNSPR [in=%d out=%x]\n", errorCode, rv));
ErrorAccordingToNSPR(PRErrorCode errorCode){    nsresult rv;    switch (errorCode) {    case PR_WOULD_BLOCK_ERROR:        rv = NS_BASE_STREAM_WOULD_BLOCK;        break;    case PR_CONNECT_ABORTED_ERROR:    case PR_CONNECT_RESET_ERROR:        rv = NS_ERROR_NET_RESET;        break;    case PR_END_OF_FILE_ERROR: // XXX document this correlation        rv = NS_ERROR_NET_INTERRUPT;        break;    case PR_CONNECT_REFUSED_ERROR:    case PR_NETWORK_UNREACHABLE_ERROR: // XXX need new nsresult for this!        rv = NS_ERROR_CONNECTION_REFUSED;        break;    case PR_CONNECT_TIMEOUT_ERROR:        rv = NS_ERROR_NET_TIMEOUT;        break;    default:        rv = NS_ERROR_FAILURE;    }    return rv;}