Public Member Functions | Static Public Member Functions | List of all members
FIX::SocketException Struct Reference

Socket Error. More...

#include <Exceptions.h>

Inheritance diagram for FIX::SocketException:
Inheritance graph
[legend]
Collaboration diagram for FIX::SocketException:
Collaboration graph
[legend]

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

Definition at line 247 of file Exceptions.h.

248 : Exception( "Socket Error", errorToWhat() ) {}
Exception(const std::string &t, const std::string &d)
Definition Exceptions.h:35
static std::string errorToWhat()
Definition Exceptions.h:253

◆ SocketException() [2/2]

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

Definition at line 250 of file Exceptions.h.

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

Member Function Documentation

◆ errorToWhat()

static 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 }

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

Generated on Mon Mar 4 2024 21:10:02 for QuickFIX by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001