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

#include <cException.h>

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

Public Member Functions

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

Public Attributes

const LOGLEV_TYPE m_eSeverity
 how bad is this ? More...
 
const LOGCHAR_tm_pszDescription
 this pointer should be to something static !? More...
 

Static Public Attributes

static const LOGCHAR_tk_szDescriptionDefault = "Exception"
 

Friends

class cExceptionTests
 

Detailed Description

Base for my custom exceptions: cExceptionHResult, cExceptionSystem, cExceptionAssert System exceptions will of course just throw cExceptionBase uses GRAY_THROW macro to hide STL vs MFC differences. MFC uses base name CException.

Constructor & Destructor Documentation

◆ cException()

Gray::cException::cException ( const LOGCHAR_t pszDescription,
LOGLEV_TYPE  eLogLevel = LOGLEV_ERROR 
)
inlinenoexcept

◆ ~cException()

virtual Gray::cException::~cException ( )
inlinevirtual

Member Function Documentation

◆ get_ErrorStr()

GRAYCORE_LINK cStringL Gray::cException::get_ErrorStr ( )

◆ get_Severity()

LOGLEV_TYPE Gray::cException::get_Severity ( ) const
inlinenoexcept

◆ GetErrorMessage()

BOOL Gray::cException::GetErrorMessage ( GChar_t lpszError,
UINT  nLenMaxError = cExceptionHolder::k_MSG_MAX_SIZE,
UINT *  pnHelpContext = nullptr 
)
virtual

overloaded to provide context specific error messages.

Note
stupid 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 in Gray::cExceptionAssert, Gray::cExceptionHResult, and GrayLib::cSQLException.

◆ what()

virtual const char* Gray::cException::what ( ) const
inlinevirtual

STL. store the GetErrorMessage string some place ?

Implements Gray::cExceptionBase.

Friends And Related Function Documentation

◆ cExceptionTests

friend class cExceptionTests
friend

Member Data Documentation

◆ k_szDescriptionDefault

const LOGCHAR_t * Gray::cException::k_szDescriptionDefault = "Exception"
static

◆ m_eSeverity

const LOGLEV_TYPE Gray::cException::m_eSeverity

how bad is this ?

◆ m_pszDescription

const LOGCHAR_t* Gray::cException::m_pszDescription

this pointer should be to something static !?


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