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

Windows runtime error. More...

#include <WinStd/Common.h>

Inheritance diagram for winstd::win_runtime_error:
winstd::num_runtime_error< DWORD > winstd::eap_runtime_error

Public Member Functions

 win_runtime_error (error_type num)
 Constructs an exception.
 
 win_runtime_error (error_type num, const std::string &msg)
 Constructs an exception.
 
 win_runtime_error (error_type num, const char *msg)
 Constructs an exception.
 
 win_runtime_error ()
 Constructs an exception using GetLastError()
 
 win_runtime_error (const std::string &msg)
 Constructs an exception using GetLastError()
 
 win_runtime_error (const char *msg)
 Constructs an exception using GetLastError()
 
- Public Member Functions inherited from winstd::num_runtime_error< DWORD >
 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 error number.
 

Static Protected Member Functions

static std::string message (error_type num, DWORD dwLanguageId=0)
 Returns a user-readable Windows error message. As std::exception messages may only be char*, we use UTF-8 by convention.
 

Additional Inherited Members

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

Detailed Description

Windows runtime error.

Constructor & Destructor Documentation

◆ win_runtime_error() [1/5]

winstd::win_runtime_error::win_runtime_error ( error_type num)
inline

Constructs an exception.

Parameters
[in]numWindows error code

◆ win_runtime_error() [2/5]

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

Constructs an exception.

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

◆ win_runtime_error() [3/5]

winstd::win_runtime_error::win_runtime_error ( error_type num,
const char * msg )
inline

Constructs an exception.

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

◆ win_runtime_error() [4/5]

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

Constructs an exception using GetLastError()

Parameters
[in]msgError message

◆ win_runtime_error() [5/5]

winstd::win_runtime_error::win_runtime_error ( const char * msg)
inline

Constructs an exception using GetLastError()

Parameters
[in]msgError message

Member Function Documentation

◆ message()

static std::string winstd::win_runtime_error::message ( error_type num,
DWORD dwLanguageId = 0 )
inlinestaticprotected

Returns a user-readable Windows error message. As std::exception messages may only be char*, we use UTF-8 by convention.

See also
FormatMessage function

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