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

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

Definition at line 660 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().

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

Here is the call graph for this function:


Generated on Fri Mar 19 11:39:30 2010 for ImpalaSrc by  doxygen 1.5.1