6 #ifndef _INC_cException_H
7 #define _INC_cException_H
25 #pragma warning(disable:4275)
47 , m_bDeleteEx(bDeleteEx)
60 if (m_bDeleteEx && m_p !=
nullptr)
73 m_bDeleteEx = bDeleteEx;
77 BOOL GetErrorMessage(
LOGCHAR_t* lpszError,
StrLen_t nLenMaxError = k_MSG_MAX_SIZE)
const;
96 : m_eSeverity(eLogLevel)
97 #if ! defined(_MFC_VER) && defined(_MSC_VER) && ! defined(UNDER_CE)
100 , m_pszDescription((pszDescription ==
nullptr) ? k_szDescriptionDefault : pszDescription)
122 return m_pszDescription;
141 , m_hResultCode(hResultCode)
149 return m_hResultCode;
151 virtual BOOL GetErrorMessage(
GChar_t* lpszError, UINT nLenMaxError, UINT* pnHelpContext)
override;
#define GRAYCORE_LINK
Definition: GrayCore.h:47
#define THROW_DEF
Definition: HResult.h:25
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define ASSERT(exp)
Definition: cDebugAssert.h:87
#define DECLARE_DYNAMIC(c)
Definition: cObject.h:105
#define UNITTEST2_PREDEF(x)
Definition: cUnitTestDecl.h:19
#define UNITTEST_FRIEND(n)
Define this in the class body to be unit tested. Allow the unit test to access private/protected stuf...
Definition: cUnitTestDecl.h:17
Definition: cExceptionBase.h:28
Definition: cException.h:130
HRESULT get_HResultCode() const noexcept
Definition: cException.h:147
cExceptionHResult(HRESULT hResultCode=E_FAIL, const LOGCHAR_t *pszDescription=nullptr, LOGLEV_TYPE eSeverity=LOGLEV_ERROR)((void) 0)
Definition: cException.h:139
HRESULT m_hResultCode
HRESULT S_OK=0, "winerror.h" code. 0x20000000 = start of custom codes. E_FAIL = unknown error.
Definition: cException.h:136
virtual ~cExceptionHResult()((void) 0)
Definition: cException.h:144
Definition: cException.h:28
cExceptionHolder() noexcept
Definition: cException.h:41
cExceptionHolder(cExceptionBase &ex) noexcept
Definition: cException.h:51
static const StrLen_t k_MSG_MAX_SIZE
arbitrary max message size.
Definition: cException.h:35
~cExceptionHolder() noexcept
Definition: cException.h:57
void AttachException(cExceptionBase *pEx, bool bDeleteEx)
Definition: cException.h:69
cExceptionHolder(cExceptionBase *pEx, bool bDeleteEx=true) noexcept
Definition: cException.h:45
Definition: cException.h:83
LOGLEV_TYPE get_Severity() const noexcept
Definition: cException.h:106
const LOGCHAR_t * m_pszDescription
this pointer should be to something static !?
Definition: cException.h:91
const LOGLEV_TYPE m_eSeverity
how bad is this ?
Definition: cException.h:90
virtual const char * what() const ((void) 0)
Definition: cException.h:119
virtual ~cException()((void) 0)
Definition: cException.h:103
cException(const LOGCHAR_t *pszDescription, LOGLEV_TYPE eLogLevel=LOGLEV_ERROR) noexcept
Definition: cException.h:95
static const LOGCHAR_t * k_szDescriptionDefault
Definition: cException.h:92
Definition: cPtrFacade.h:19
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
int StrLen_t
the length of a string in chars (bytes for UTF8, wchar_t for UNICODE). or offset in characters....
Definition: StrConst.h:32
LOGLEV_TYPE
Definition: cLogLevel.h:22
cStringT< LOGCHAR_t > cStringL
Log string.
Definition: cException.h:20
class __DECL_IMPORT cException
Definition: cExceptionBase.h:47
char GChar_t
My version of TCHAR, _TCHAR.
Definition: StrConst.h:26
char LOGCHAR_t
always just use UTF8 for logs, don't bother with UNICODE.
Definition: cLogLevel.h:17