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

#include <cSQLBase.h>

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

Public Member Functions

 cSQLException (cStringA sCommand="", cStringA sDescription="", const cDebugSourceLine &src=cDebugSourceLine())
 
virtual ~cSQLException () throw ()
 
virtual BOOL GetErrorMessage (GChar_t *lpszError, UINT nLenMax, UINT *pnHelpContext=nullptr)
 
- Public Member Functions inherited from Gray::cExceptionHResult
 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
 
- 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

cStringA m_sCommand
 The command i used to get here. More...
 
cStringA m_sDescription
 m_pszDescription of the error. (Strip the [driver name] header off ?) More...
 
cDebugSourceLine m_Src
 DEBUGSOURCELINE. More...
 
SQL_RETURN_t m_nNativeError
 SQL native/driver return code. AKA SQLRETURN or RETCODE. e.g. SQL_SUCCESS. More...
 
cStringA m_strStateNativeOrigin
 no idea what this code means. some text related to m_nNativeError? More...
 
- Public Attributes inherited from Gray::cExceptionHResult
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

Similar to MFC CDBException. ODBC does not use HRESULT type codes unfortunately.

Constructor & Destructor Documentation

◆ cSQLException()

GrayLib::cSQLException::cSQLException ( cStringA  sCommand = "",
cStringA  sDescription = "",
const cDebugSourceLine src = cDebugSourceLine() 
)

◆ ~cSQLException()

GrayLib::cSQLException::~cSQLException ( )
throw (
)
virtual

Member Function Documentation

◆ GetErrorMessage()

BOOL GrayLib::cSQLException::GetErrorMessage ( GChar_t lpszError,
UINT  nLenMaxError,
UINT *  pnHelpContext = nullptr 
)
virtual

overloaded to provide context specific error messages.

Note
stupid BOOL return is for MFC compatibility.

Describe all this error data. MFC like method

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::cExceptionHResult.

Member Data Documentation

◆ m_nNativeError

SQL_RETURN_t GrayLib::cSQLException::m_nNativeError

SQL native/driver return code. AKA SQLRETURN or RETCODE. e.g. SQL_SUCCESS.

◆ m_sCommand

cStringA GrayLib::cSQLException::m_sCommand

The command i used to get here.

◆ m_sDescription

cStringA GrayLib::cSQLException::m_sDescription

m_pszDescription of the error. (Strip the [driver name] header off ?)

◆ m_Src

cDebugSourceLine GrayLib::cSQLException::m_Src

DEBUGSOURCELINE.

◆ m_strStateNativeOrigin

cStringA GrayLib::cSQLException::m_strStateNativeOrigin

no idea what this code means. some text related to m_nNativeError?


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