WinStd
Windows Win32 API using Standard C++
Loading...
Searching...
No Matches
Public Member Functions | List of all members
winstd::ws2_runtime_error Class Reference

WinSock2 runtime error. More...

#include <WinStd/WinSock2.h>

Inheritance diagram for winstd::ws2_runtime_error:
winstd::num_runtime_error< int >

Public Member Functions

 ws2_runtime_error (error_type num, const std::string &msg)
 Constructs an exception.
 
 ws2_runtime_error (error_type num, const char *msg=nullptr)
 Constructs an exception.
 
 ws2_runtime_error (const std::string &msg)
 Constructs an exception using WSAGetLastError()
 
 ws2_runtime_error (const char *msg=nullptr)
 Constructs an exception using WSAGetLastError()
 
tstring msg (DWORD dwLanguageId=0) const
 Returns a user-readable Windows error message.
 
- Public Member Functions inherited from winstd::num_runtime_error< int >
 num_runtime_error (error_type num, const std::string &msg)
 Constructs an exception.
 
 num_runtime_error (error_type num, const char *msg=nullptr)
 Constructs an exception.
 
error_type number () const
 Returns the Windows error number.
 

Additional Inherited Members

- Public Types inherited from winstd::num_runtime_error< int >
typedef int error_type
 Error number type.
 
- Protected Attributes inherited from winstd::num_runtime_error< int >
error_type m_num
 Numeric error code.
 

Detailed Description

WinSock2 runtime error.

Constructor & Destructor Documentation

◆ ws2_runtime_error() [1/4]

winstd::ws2_runtime_error::ws2_runtime_error ( error_type  num,
const std::string &  msg 
)
inline

Constructs an exception.

Parameters
[in]numWinSock2 error code
[in]msgError message

◆ ws2_runtime_error() [2/4]

winstd::ws2_runtime_error::ws2_runtime_error ( error_type  num,
const char *  msg = nullptr 
)
inline

Constructs an exception.

Parameters
[in]numWinSock2 error code
[in]msgError message

◆ ws2_runtime_error() [3/4]

winstd::ws2_runtime_error::ws2_runtime_error ( const std::string &  msg)
inline

Constructs an exception using WSAGetLastError()

Parameters
[in]msgError message

◆ ws2_runtime_error() [4/4]

winstd::ws2_runtime_error::ws2_runtime_error ( const char *  msg = nullptr)
inline

Constructs an exception using WSAGetLastError()

Parameters
[in]msgError message

Member Function Documentation

◆ msg()

tstring winstd::ws2_runtime_error::msg ( DWORD  dwLanguageId = 0) const
inline

Returns a user-readable Windows error message.

See also
FormatMessage function

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