|
fswatch
1.11.2
|
Helper class to get the system-defined error message for a Microsoft Windows' error code. More...
#include <win_error_message.hpp>
Public Member Functions | |
| win_error_message (DWORD error_code) | |
Constructs an error message using the specified error_code. More... | |
| win_error_message () | |
Constructs an error message using the last error code of the calling thread, retrieved with a call to GetLastError(). More... | |
| DWORD | get_error_code () const |
| Gets the error code. More... | |
| std::wstring | get_message () const |
| Gets the system-defined error message. More... | |
| operator std::wstring () const | |
| Gets ths system-defined error message. More... | |
Static Public Member Functions | |
| static win_error_message | current () |
Constructs an instance of this class using the last error code of the calling thread, returned by a call to GetLastError(). More... | |
Helper class to get the system-defined error message for a Microsoft Windows' error code.
This class uses the FormatMessage() API to returns a std::wstring instance containing the system-defined error message for a Microsoft Windows' error code.
| fsw::win_error_message::win_error_message | ( | DWORD | error_code | ) |
Constructs an error message using the specified error_code.
| error_code | The error code. |
| fsw::win_error_message::win_error_message | ( | ) |
Constructs an error message using the last error code of the calling thread, retrieved with a call to GetLastError().
|
static |
Constructs an instance of this class using the last error code of the calling thread, returned by a call to GetLastError().
| DWORD fsw::win_error_message::get_error_code | ( | ) | const |
Gets the error code.
| std::wstring fsw::win_error_message::get_message | ( | ) | const |
Gets the system-defined error message.
The system-defined error message is retrieved with a call to FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM formatting option.
| fsw::win_error_message::operator std::wstring | ( | ) | const |
Gets ths system-defined error message.
1.8.13