NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions
Database Exceptions
+ Collaboration diagram for Database Exceptions:

Classes

class  CDB_Exception
 CDB_Exception –. More...
 
struct  CDB_Exception::SMessageInContext
 
struct  CDB_Exception::SContext
 
struct  CDB_Exception::SParams
 
struct  CDB_Exception::SParam
 
class  CDB_DSEx
 
class  CDB_RPCEx
 
class  CDB_SQLEx
 
class  CDB_DeadlockEx
 
class  CDB_TimeoutEx
 
class  CDB_ClientEx
 
class  CDB_TruncateEx
 
class  CDB_MultiEx
 
class  CDB_UserHandler
 
class  CDB_UserHandler_Diag
 
class  CDB_UserHandler_Stream
 
class  CDB_UserHandler_Exception
 
class  CDB_UserHandler_Deferred
 
class  CDB_UserHandler_Exception_ODBC
 

Macros

#define NCBI_DATABASE_EXCEPTION_DEFAULT_IMPLEMENTATION(exception_class, base_class, db_err_code)
 Helper macro for default database exception implementation. More...
 
#define NCBI_DATABASE_THROW(exception_class, message, err_code, severity)
 Generic macro to throw a database exception, given the exception class, database error code and message string. More...
 
#define NCBI_DATABASE_RETHROW(prev_exception, exception_class, message, err_code, severity)
 
#define NCBI_DATABASE_THROW_ANNOTATED(ex_class, message, err_code, severity, dbg_info, conn, params)
 
#define NCBI_DATABASE_RETHROW_ANNOTATED(prev_ex, ex_class, message, err_code, severity, dbg_info, conn, params)
 
#define DATABASE_DRIVER_ERROR(message, err_code)   NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Error )
 
#define DATABASE_DRIVER_ERROR_EX(prev_exception, message, err_code)
 
#define DATABASE_DRIVER_WARNING(message, err_code)   NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Warning )
 
#define DATABASE_DRIVER_WARNING_EX(prev_exception, message, err_code)
 
#define DATABASE_DRIVER_FATAL(message, err_code)   NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Fatal )
 
#define DATABASE_DRIVER_FATAL_EX(prev_exception, message, err_code)
 
#define DATABASE_DRIVER_INFO(message, err_code)   NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Info )
 
#define DATABASE_DRIVER_INFO_EX(prev_exception, message, err_code)
 
#define CHECK_DRIVER_ERROR(failed, message, err_code)   if ( ( failed ) ) { DATABASE_DRIVER_ERROR( message, err_code ); }
 
#define CHECK_DRIVER_WARNING(failed, message, err_code)   if ( ( failed ) ) { DATABASE_DRIVER_WARNING( message, err_code ); }
 
#define CHECK_DRIVER_FATAL(failed, message, err_code)   if ( ( failed ) ) { DATABASE_DRIVER_FATAL( message, err_code ); }
 
#define CHECK_DRIVER_INFO(failed, message, err_code)   if ( ( failed ) ) { DATABASE_DRIVER_INFO( message, err_code ); }
 

Typedefs

typedef CDB_UserHandler_Diag CDB_UserHandler_Default
 

Enumerations

enum  EDB_Severity {
  eDB_Info, eDB_Warning, eDB_Error, eDB_Fatal,
  eDB_Unknown
}
 
enum  CDB_Exception::EErrCode {
  CDB_Exception::eDS, CDB_Exception::eRPC, CDB_Exception::eSQL, CDB_Exception::eDeadlock,
  CDB_Exception::eTimeout, CDB_Exception::eClient, CDB_Exception::eMulti, CDB_Exception::eTruncate
}
 Error types that can be generated. More...
 

Functions

CDB_Exception::SMessageInContext operator+ (const string &msg, const CDB_Exception::SContext &ctx)
 
CDB_Exception::SMessageInContext operator+ (const char *msg, const CDB_Exception::SContext &ctx)
 
ostream & operator<< (ostream &os, const CDB_Exception::SContext &ctx)
 
ostream & operator<< (ostream &os, const CDB_Exception::SMessageInContext &msg)
 

Detailed Description

Macro Definition Documentation

#define CHECK_DRIVER_ERROR (   failed,
  message,
  err_code 
)    if ( ( failed ) ) { DATABASE_DRIVER_ERROR( message, err_code ); }

Definition at line 738 of file exception.hpp.

Referenced by CDB_TinyInt::AssignValue(), CDB_VarChar::AssignValue(), CDB_Char::AssignValue(), CDB_LongChar::AssignValue(), CDB_VarBinary::AssignValue(), CDB_Binary::AssignValue(), CDB_LongBinary::AssignValue(), CDB_Stream::AssignValue(), CDB_SmallDateTime::AssignValue(), CDB_DateTime::AssignValue(), CDB_Bit::AssignValue(), CDB_Numeric::AssignValue(), CDBL_Connection::BCPIn(), CDB_BCPInCmd::CDB_BCPInCmd(), CDB_Connection::CDB_Connection(), CDB_CursorCmd::CDB_CursorCmd(), CDB_LangCmd::CDB_LangCmd(), CDB_Result::CDB_Result(), CDB_RPCCmd::CDB_RPCCmd(), CDB_SendDataCmd::CDB_SendDataCmd(), CDBL_BlobDescriptor::CDBL_BlobDescriptor(), CDBLibContext::CDBLibContext(), CDBConnectionFactory::CMapperFactory::CMapperFactory(), CTL_Connection::CompleteBlobDescriptor(), CTL_Connection::CompleteBlobDescriptors(), ConvertI2UI(), CTL_RowResult::CTL_RowResult(), CTL_SendDataCmd::CTL_SendDataCmd(), CTL_RowResult::GetBlobDescriptor(), CTL_RowResult::GetItemInternal(), impl::CDB_Params::GetParamNum(), CTL_LRCmd::MakeResultInternal(), CDBL_CursorCmd::OpenCursor(), CTL_CursorCmd::OpenCursor(), CTL_CursorCmdExpl::OpenCursor(), impl::CDBHandlerStack::Pop(), impl::CDBHandlerStack::Push(), CDBL_LangCmd::Result(), CDBL_LangCmd::Send(), CTL_LangCmd::Send(), CTL_RPCCmd::Send(), CTL_BCPInCmd::Send(), CDBL_SendDataCmd::SendChunk(), CTL_SendDataCmd::SendChunk(), CDBL_Connection::SendDataCmd(), CTL_Connection::x_GetNativeBlobDescriptor(), CTL_Cmd::x_Init(), CTL_Connection::x_LoadTextPtrProcs(), CDB_Numeric::x_MakeFromString(), and CTL_Connection::x_SendUpdateWrite().

#define CHECK_DRIVER_FATAL (   failed,
  message,
  err_code 
)    if ( ( failed ) ) { DATABASE_DRIVER_FATAL( message, err_code ); }

Definition at line 744 of file exception.hpp.

#define CHECK_DRIVER_INFO (   failed,
  message,
  err_code 
)    if ( ( failed ) ) { DATABASE_DRIVER_INFO( message, err_code ); }

Definition at line 747 of file exception.hpp.

#define CHECK_DRIVER_WARNING (   failed,
  message,
  err_code 
)    if ( ( failed ) ) { DATABASE_DRIVER_WARNING( message, err_code ); }
#define DATABASE_DRIVER_ERROR (   message,
  err_code 
)    NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Error )

Definition at line 713 of file exception.hpp.

Referenced by CTL_BCPInCmd::AddHint(), CDBL_Result::AltGetItem(), CDB_Int::AssignValue(), CDB_SmallInt::AssignValue(), CDB_BigInt::AssignValue(), CDB_Float::AssignValue(), CDB_Double::AssignValue(), CODBC_Connection::BCPIn(), CDBParams::Bind(), CTL_BCPInCmd::Cancel(), CBlobStoreDynamic::CBlobStoreDynamic(), CDBInterfacesFileConnParams::CDBInterfacesFileConnParams(), CDBL_BCPInCmd::CDBL_BCPInCmd(), CDBL_ComputeResult::CDBL_ComputeResult(), CDBL_Connection::CDBL_Connection(), CDBLibContext::CDBLibContext(), CDBUriConnParams::CDBUriConnParams(), impl::CConnection::CheckCanOpen(), value_slice::CheckNULL(), CStatementBase::CheckRC(), CTL_BCPInCmd::CheckSentSFB(), CTL_BCPInCmd::CheckSF(), CTL_Connection::CheckSFB(), CTL_LRCmd::CheckSFB(), CTL_CursorCmd::CheckSFB(), CTL_BCPInCmd::CheckSFB(), CTL_Cmd::CheckSFB_Internal(), CTL_CursorCmd::CheckSFBCP(), CStatementBase::CheckSIE(), CStatementBase::CheckSIENd(), CODBC_RowResult::CheckSIENoD_Binary(), CODBC_RowResult::CheckSIENoD_Text(), value_slice::CheckType(), CODBC_Connection::Close(), CODBC_BCPInCmd::CODBC_BCPInCmd(), CODBC_Connection::CODBC_Connection(), CODBC_RowResult::CODBC_RowResult(), CODBC_SendDataCmd::CODBC_SendDataCmd(), CODBCContext::CODBCContext(), ctlib::Command::Command(), CDBL_BCPInCmd::CommitBCPTrans(), CODBC_BCPInCmd::CommitBCPTrans(), CTL_BCPInCmd::CommitBCPTrans(), ctlib::Connection::Connection(), CDB_Object::Create(), CTL_Connection::CTL_Connection(), CTL_SendDataCmd::CTL_SendDataCmd(), CTLibContext::CTLibContext(), impl::CWinSock::CWinSock(), CBlobStoreBase::Delete(), CDBConnectionFactory::DispatchServerName(), CDBL_BCPInCmd::EndBCP(), CODBC_BCPInCmd::EndBCP(), CBlobStoreBase::Exists(), CDBL_RowResult::Fetch(), CDBL_BlobResult::Fetch(), CODBC_RowResult::Fetch(), CDBL_ComputeResult::Fetch(), CDBL_CursorResult::Fetch(), CTL_RowResult::Fetch(), CResultSetMetaData::FindParamPosInternal(), impl::CCachedRowInfo::FindParamPosInternal(), Get_I_DriverContext(), CODBC_RowResult::GetBlobDescriptor(), CBlobStoreStatic::GetConn(), CBlobStoreDynamic::GetConn(), ctlib::Connection::GetCTLConn(), impl::CDBBindedParams::GetDirection(), C_xDriverMgr::GetDriverContext(), impl::CCachedRowInfo::GetIndex(), CDBL_BlobResult::GetItem(), CDBL_StatusResult::GetItem(), CTL_CursorResultExpl::GetItem(), CDBL_Result::GetItemInternal(), impl::CConnection::GetLowLevelHandle(), impl::CDBBindedParams::GetMaxSize(), impl::CDB_Params::GetParamNum(), CDB_Object::GetTypeName(), impl::CRowInfo_SP_SQL_Server::Initialize(), make_server(), MakeDriverContext(), CDBParamVariant::MakeName(), impl::CDriverContext::MakePooledConnection(), CTL_LRCmd::MakeResultInternal(), CTL_RowResult::my_ct_get_data(), CBlobStoreBase::OpenForRead(), CDBL_BlobResult::ReadItem(), CODBC_RowResult::ReadItem(), CBlobStoreBase::ReadTableDescr(), value_slice::ReportTypeConvError(), CDBL_LangCmd::Result(), CDBL_RPCCmd::Result(), CODBC_LangCmd::Result(), CODBC_RPCCmd::Result(), CODBC_SendDataCmd::Result(), CDBL_Result::RetGetItem(), s_GenericGetItem(), impl::s_TransformLoginData(), CDBL_LangCmd::Send(), CDBL_RPCCmd::Send(), CODBC_LangCmd::Send(), CDBL_BCPInCmd::Send(), CODBC_RPCCmd::Send(), CODBC_BCPInCmd::Send(), CDBL_SendDataCmd::SendChunk(), CODBC_SendDataCmd::SendChunk(), CTL_SendDataCmd::SendChunk(), CODBC_Connection::SendData(), CDBL_Connection::SendDataCmd(), CTL_LRCmd::SendInternal(), CDBParams::Set(), CDbapiConnMgr::SetConnectionFactory(), CTL_BCPInCmd::SetHints(), CBlobStoreBase::SetTableDescr(), CBlobStoreBase::SetTextSizeServerSide(), CDBL_BlobResult::SkipItem(), CDBL_LangCmd::x_AssignParams(), CDBL_CursorCmd::x_AssignParams(), CODBC_LangCmd::x_AssignParams(), CTL_CursorCmdExpl::x_AssignParams(), CTL_BCPInCmd::x_BlkSetHints(), CTL_LRCmd::x_Cancel(), CODBC_Connection::x_Connect(), CDBL_Connection::x_GetNativeBlobDescriptor(), CODBC_RowResult::x_LoadItem(), CDB_Numeric::x_MakeFromString(), CODBC_RowResult::x_MakeItem(), CDBL_Connection::x_SendData(), CODBC_Connection::x_SendData(), CTL_Connection::x_SendData(), CODBC_LangCmd::xCheck4MoreResults(), CODBC_RPCCmd::xCheck4MoreResults(), CODBC_SendDataCmd::xCheck4MoreResults(), and CODBC_RowResult::xGetData().

#define DATABASE_DRIVER_ERROR_EX (   prev_exception,
  message,
  err_code 
)
#define DATABASE_DRIVER_FATAL (   message,
  err_code 
)    NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Fatal )

Definition at line 725 of file exception.hpp.

Referenced by CTL_Cmd::DropSybaseCmd().

#define DATABASE_DRIVER_FATAL_EX (   prev_exception,
  message,
  err_code 
)
Value:
NCBI_DATABASE_RETHROW( prev_exception, CDB_ClientEx, message, err_code, \
Fatal error – guarantees exit(or abort)
Definition: ncbidiag.hpp:649
#define NCBI_DATABASE_RETHROW(prev_exception, exception_class, message, err_code, severity)
Definition: exception.hpp:698

Definition at line 727 of file exception.hpp.

#define DATABASE_DRIVER_INFO (   message,
  err_code 
)    NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Info )

Definition at line 731 of file exception.hpp.

Referenced by CTL_LRCmd::MakeResultInternal().

#define DATABASE_DRIVER_INFO_EX (   prev_exception,
  message,
  err_code 
)
Value:
NCBI_DATABASE_RETHROW( prev_exception, CDB_ClientEx, message, err_code, \
Informational message.
Definition: ncbidiag.hpp:645
#define NCBI_DATABASE_RETHROW(prev_exception, exception_class, message, err_code, severity)
Definition: exception.hpp:698

Definition at line 733 of file exception.hpp.

#define DATABASE_DRIVER_WARNING (   message,
  err_code 
)    NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Warning )
#define DATABASE_DRIVER_WARNING_EX (   prev_exception,
  message,
  err_code 
)
Value:
NCBI_DATABASE_RETHROW( prev_exception, CDB_ClientEx, message, err_code, \
Warning message.
Definition: ncbidiag.hpp:646
#define NCBI_DATABASE_RETHROW(prev_exception, exception_class, message, err_code, severity)
Definition: exception.hpp:698

Definition at line 721 of file exception.hpp.

#define NCBI_DATABASE_EXCEPTION_DEFAULT_IMPLEMENTATION (   exception_class,
  base_class,
  db_err_code 
)

Helper macro for default database exception implementation.

Definition at line 61 of file exception.hpp.

#define NCBI_DATABASE_RETHROW (   prev_exception,
  exception_class,
  message,
  err_code,
  severity 
)
Value:
throw exception_class( DIAG_COMPILE_INFO, \
&(prev_exception), (message), severity, err_code )
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
Definition: ncbidiag.hpp:169

Definition at line 698 of file exception.hpp.

#define NCBI_DATABASE_RETHROW_ANNOTATED (   prev_ex,
  ex_class,
  message,
  err_code,
  severity,
  dbg_info,
  conn,
  params 
)
Value:
throw ex_class(DIAG_COMPILE_INFO, &(prev_ex), (message), severity, \
err_code, dbg_info, conn, params)
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
Definition: ncbidiag.hpp:169
static CS_CONNECTION * conn
Definition: get_send_data.c:18

Definition at line 708 of file exception.hpp.

#define NCBI_DATABASE_THROW (   exception_class,
  message,
  err_code,
  severity 
)
Value:
throw exception_class( DIAG_COMPILE_INFO, \
0, (message), severity, err_code )
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
Definition: ncbidiag.hpp:169

Generic macro to throw a database exception, given the exception class, database error code and message string.

Definition at line 695 of file exception.hpp.

#define NCBI_DATABASE_THROW_ANNOTATED (   ex_class,
  message,
  err_code,
  severity,
  dbg_info,
  conn,
  params 
)
Value:
throw ex_class(DIAG_COMPILE_INFO, NULL, (message), severity, err_code, \
dbg_info, conn, params)
#define NULL
Definition: ncbistd.hpp:225
#define DIAG_COMPILE_INFO
Make compile time diagnostic information object to use in CNcbiDiag and CException.
Definition: ncbidiag.hpp:169
static CS_CONNECTION * conn
Definition: get_send_data.c:18

Definition at line 704 of file exception.hpp.

Referenced by CTL_CmdBase::CheckIsDead(), CTL_RowResult::CheckIsDead(), and CTL_CmdBase::SetHasFailed().

Typedef Documentation

Definition at line 690 of file exception.hpp.

Enumeration Type Documentation

Enumerator
eDB_Info 
eDB_Warning 
eDB_Error 
eDB_Fatal 
eDB_Unknown 

Definition at line 97 of file exception.hpp.

Error types that can be generated.

Enumerator
eDS 
eRPC 
eSQL 
eDeadlock 
eTimeout 
eClient 
eMulti 
eTruncate 

Definition at line 123 of file exception.hpp.

Function Documentation

Definition at line 272 of file exception.hpp.

CDB_Exception::SMessageInContext operator+ ( const char *  msg,
const CDB_Exception::SContext ctx 
)
inline

Definition at line 279 of file exception.hpp.

ostream& operator<< ( ostream &  os,
const CDB_Exception::SContext ctx 
)
ostream& operator<< ( ostream &  os,
const CDB_Exception::SMessageInContext msg 
)
Modified on Mon May 29 16:59:48 2017 by modify_doxy.py rev. 533848