Voxel
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
WindowsException Struct Reference

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.

Detailed Description

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:

  1. Filename and line number at which the exception was thrown.
  2. Description string what passed to the constructor.
  3. Description of the HRESULT error code passed to the constructor.

Definition at line 64 of file windows_exception.h.


The documentation for this struct was generated from the following files: