FIX::SocketException Struct Reference

Socket Error. More...

#include <Exceptions.h>

Inheritance diagram for FIX::SocketException:
Collaboration diagram for FIX::SocketException:

Public Member Functions

 SocketException ()
 SocketException (const std::string &what)
Public Member Functions inherited from FIX::Exception
 Exception (const std::string &t, const std::string &d)
 ~Exception () throw ()

Static Public Member Functions

static std::string errorToWhat ()

Additional Inherited Members

Public Attributes inherited from FIX::Exception
std::string type
std::string detail

Detailed Description

Socket Error.

Definition at line 245 of file Exceptions.h.

Constructor & Destructor Documentation

◆ SocketException() [1/2]

FIX::SocketException::SocketException ( )
inline

◆ SocketException() [2/2]

FIX::SocketException::SocketException ( const std::string & what)
inline

Definition at line 250 of file Exceptions.h.

251 : Exception( "Socket Error", what ) {}

References FIX::Exception::Exception().

Member Function Documentation

◆ errorToWhat()

std::string FIX::SocketException::errorToWhat ( )
inlinestatic

Definition at line 253 of file Exceptions.h.

254 {
255#ifdef _MSC_VER
256 int error = WSAGetLastError();
257 char buffer[2048];
258 FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM, NULL, error,
259 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
260 buffer, 2048, NULL );
261 return buffer;
262#else
263 int error = errno;
264 return strerror( error );
265#endif
266 }

Referenced by SocketException(), and FIX::SocketRecvFailed::SocketRecvFailed().


The documentation for this struct was generated from the following file:

Generated on for QuickFIX by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2001