WinStd Additional templates and function helpers for Microsoft Windows using Standard C++ classes

Public Member Functions | List of all members
winstd::win_runtime_error Class Reference
Exceptions

Windows runtime error. More...

`#include <Common.h>`

Inheritance diagram for winstd::win_runtime_error:

## Public Member Functions
| win_runtime_error (_In_ error_type num, _In_ const std::string &msg)
| Constructs an exception. More...
| win_runtime_error (_In_ error_type num, _In_opt_z_ const char *msg=nullptr)
| Constructs an exception. More...
| win_runtime_error (_In_ const std::string &msg)
| Constructs an exception using `GetLastError()` More...
| win_runtime_error (_In_opt_z_ const char *msg=nullptr)
| Constructs an exception using `GetLastError()` More...
tstring | msg (_In_opt_ DWORD dwLanguageId=0) const
| Returns a user-readable Windows error message. More...
Public Member Functions inherited from winstd::num_runtime_error< DWORD >
| num_runtime_error (_In_ error_type num, _In_ const std::string &msg)
| Constructs an exception. More...
| num_runtime_error (_In_ error_type num, _In_opt_z_ const char *msg=nullptr)
| Constructs an exception. More...
error_type | number () const
| Returns the Windows error number.

## 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/4]

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

Constructs an exception.

Parameters

  [in] | num | Windows error code
  [in] | msg | Error message

## ◆ win_runtime_error() [2/4]

winstd::win_runtime_error::win_runtime_error | ( | _In_ error_type | num,
|  | _In_opt_z_ const char * | msg = `nullptr`
| ) |  |
| inline

Constructs an exception.

Parameters

  [in] | num | Windows error code
  [in] | msg | Error message

## ◆ win_runtime_error() [3/4]

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

Constructs an exception using `GetLastError()`

Parameters

  [in] | msg | Error message

## ◆ win_runtime_error() [4/4]

winstd::win_runtime_error::win_runtime_error | ( | _In_opt_z_ const char * | msg = `nullptr` | ) |
| inline

Constructs an exception using `GetLastError()`

Parameters

  [in] | msg | Error message

## Member Function Documentation

## ◆ msg()

tstring winstd::win_runtime_error::msg | ( | _In_opt_ 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:

- include/WinStd/Common.h