Windows exception class. More...
#include <windows_exception.h>
Public Member Functions | |
WindowsException (char const *const file, unsigned int const line, std::string const &what, HRESULT const hResult) | |
virtual const char * | what () const throw () |
Returns text (UTF-8) error message for this exception. |
Windows exception class.
WindowsExceptions should not be constructed explicitly. Instead, use the THROW_WINDOWS_EXCEPTION() macro, which will construct and throw an exception annotated with the filename and line number of the failure.
The difference between this class and the "default" exception class is that WindowsExceptions convert HRESULT
error codes into error strings.
The error message returned by what() has the following components:
what
passed to the constructor.HRESULT
error code passed to the constructor. Definition at line 64 of file windows_exception.h.