Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Util::Channel::HandleError ( CString  msg,
bool  isSockError 
) [inline, private]

Definition at line 679 of file Channel.h.

References Impala::Util::ChannelListener::HandleError(), ILOG_ERROR, mFpError, mListener, and mNrError.

Referenced by Channel(), InitSocket(), MaximizeSendRecvBuffer(), RecvLarge(), SendLarge(), SendRequest(), Serve(), and WaitForSocketEvent().

00680     {
00681         mNrError++;
00682         String err;
00683 
00684 #ifdef unix
00685 
00686         err = String(strerror(errno));
00687 
00688 #else
00689 
00690         // Errors are handled by calling the WSAGetLastError routine which
00691         // will return the last error as one of the following.
00692         switch (WSAGetLastError())
00693         {
00694         case WSANOTINITIALISED :
00695             err = "Unable to initialise socket.";
00696             break;
00697         case WSAEAFNOSUPPORT :
00698             err = "The specified address family is not supported.";
00699             break;
00700         case WSAEADDRNOTAVAIL :
00701             err = "Specified address is not available from the local machine.";
00702             break;
00703         case WSAECONNREFUSED :
00704             err = "The attempt to connect was forcefully rejected.";
00705             break;
00706         case WSAEDESTADDRREQ :
00707             err = "Address destination address is required.";
00708             break;
00709         case WSAEFAULT :
00710             err = "The namelen argument is incorrect.";
00711             break;
00712         case WSAEINVAL :
00713             err = "The socket is not already bound to an address.";
00714             break;
00715         case WSAEISCONN :
00716             err = "The socket is already connected.";
00717             break;
00718         case WSAEADDRINUSE :
00719             err = "The specified address is already in use.";
00720             break;
00721         case WSAEMFILE :
00722             err = "No more file descriptors are available.";
00723             break;
00724         case WSAENOBUFS :
00725             err = "No buffer space available. The socket cannot be created.";
00726             break;
00727         case WSAEPROTONOSUPPORT :
00728             err = "The specified protocol is not supported.";
00729             break;
00730         case WSAEPROTOTYPE :
00731             err = "The specified protocol is the wrong type for this socket.";
00732             break;
00733         case WSAENETUNREACH :
00734             err = "The network can't be reached from this host at this time.";
00735             break;
00736         case WSAENOTSOCK :
00737             err = "The descriptor is not a socket.";
00738             break;
00739         case WSAETIMEDOUT :
00740             err = "Attempt timed out without establishing a connection.";
00741             break;
00742         case WSAESOCKTNOSUPPORT :
00743             err = "Socket type is not supported in this address family.";
00744             break;
00745         case WSAENETDOWN :
00746             err = "Network subsystem failure.";
00747             break;
00748         case WSAHOST_NOT_FOUND :
00749             err = "Authoritative Answer Host not found.";
00750             break;
00751         case WSATRY_AGAIN :
00752             err = "Non-Authoritative Host not found or SERVERFAIL.";
00753             break;
00754         case WSANO_RECOVERY :
00755             err = "Non recoverable errors, FORMERR, REFUSED, NOTIMP.";
00756             break;
00757         case WSANO_DATA :
00758             err = "Valid name, no data record of requested type.";
00759             break;
00760         case WSAEINPROGRESS :
00761             err = "Address blocking Windows Sockets operation is in progress.";
00762             break;
00763         case WSAEINTR :
00764             err = "The (blocking) call was canceled via WSACancelBlockingCall.";
00765             break;
00766         default :
00767             err = "Unknown error.";
00768             break;
00769         }
00770 
00771 #endif
00772 
00773         String finalMsg = msg;
00774         if (isSockError)
00775             finalMsg += ": " + err;
00776 
00777         if (mListener)
00778             mListener->HandleError(finalMsg);
00779         else if (mFpError)
00780             (mFpError)(finalMsg);
00781         else
00782             ILOG_ERROR(finalMsg);
00783     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:24:09 2011 for ImpalaSrc by  doxygen 1.5.1