Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cExceptionHResult Class Reference

#include <cException.h>

Inheritance diagram for Gray::cExceptionHResult:
Gray::cException Gray::cExceptionBase GrayLib::cSQLException

Public Member Functions

 cExceptionHResult (HRESULT hResultCode=E_FAIL, const LOGCHAR_t *pszDescription=nullptr, LOGLEV_TYPE eSeverity=LOGLEV_ERROR)((void) 0)
 
virtual ~cExceptionHResult ()((void) 0)
 
HRESULT get_HResultCode () const noexcept
 
virtual BOOL GetErrorMessage (GChar_t *lpszError, UINT nLenMaxError, UINT *pnHelpContext) override
 
- Public Member Functions inherited from Gray::cException
 cException (const LOGCHAR_t *pszDescription, LOGLEV_TYPE eLogLevel=LOGLEV_ERROR) noexcept
 
virtual ~cException ()((void) 0)
 
LOGLEV_TYPE get_Severity () const noexcept
 
cStringL get_ErrorStr ()
 
virtual const char * what () const ((void) 0)
 
- Public Member Functions inherited from Gray::cExceptionBase
virtual ~cExceptionBase ()
 

Public Attributes

HRESULT m_hResultCode
 HRESULT S_OK=0, "winerror.h" code. 0x20000000 = start of custom codes. E_FAIL = unknown error. More...
 
- Public Attributes inherited from Gray::cException
const LOGLEV_TYPE m_eSeverity
 how bad is this ? More...
 
const LOGCHAR_tm_pszDescription
 this pointer should be to something static !? More...
 

Additional Inherited Members

- Static Public Attributes inherited from Gray::cException
static const LOGCHAR_tk_szDescriptionDefault = "Exception"
 

Detailed Description

Store some HRESULT error code based exception.

Constructor & Destructor Documentation

◆ cExceptionHResult()

Gray::cExceptionHResult::cExceptionHResult ( HRESULT  hResultCode = E_FAIL,
const LOGCHAR_t pszDescription = nullptr,
LOGLEV_TYPE  eSeverity = LOGLEV_ERROR 
)
inline

◆ ~cExceptionHResult()

virtual Gray::cExceptionHResult::~cExceptionHResult ( )
inlinevirtual

Member Function Documentation

◆ get_HResultCode()

HRESULT Gray::cExceptionHResult::get_HResultCode ( ) const
inlinenoexcept

◆ GetErrorMessage()

BOOL Gray::cExceptionHResult::GetErrorMessage ( GChar_t lpszError,
UINT  nLenMaxError,
UINT *  pnHelpContext 
)
overridevirtual

overloaded to provide context specific error messages.

Note
stupid BOOL return is for MFC compatibility.

Compatible with MFC CException and CFileException

Note
pointless BOOL return is for MFC compatibility.

Compatible with MFC CException and CFileException. Assume this is typically overridden at a higher level.

Note
stupid BOOL return is for MFC compatibility. allow UNICODE version of this.

Reimplemented from Gray::cException.

Reimplemented in GrayLib::cSQLException.

Member Data Documentation

◆ m_hResultCode

HRESULT Gray::cExceptionHResult::m_hResultCode

HRESULT S_OK=0, "winerror.h" code. 0x20000000 = start of custom codes. E_FAIL = unknown error.


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