Database Exceptions
[DBAPI]

Collaboration diagram for Database Exceptions:


Classes

class  CDB_Exception
 CDB_Exception --. More...
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_Exception_ODBC

Defines

#define NCBI_DATABASE_EXCEPTION_DEFAULT_IMPLEMENTATION(exception_class, base_class, db_err_code)
 Helper macro for default database exception implementation.
#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.
#define NCBI_DATABASE_RETHROW(prev_exception, exception_class, message, err_code, severity)
#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
}


Define Documentation

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

Definition at line 590 of file exception.hpp.

Referenced by CDB_Numeric::AssignValue(), CDB_Bit::AssignValue(), CDB_DateTime::AssignValue(), CDB_SmallDateTime::AssignValue(), CDB_Stream::AssignValue(), CDB_LongBinary::AssignValue(), CDB_Binary::AssignValue(), CDB_VarBinary::AssignValue(), CDB_LongChar::AssignValue(), CDB_Char::AssignValue(), CDB_VarChar::AssignValue(), CDB_TinyInt::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_ITDescriptor::CDBL_ITDescriptor(), CDBLibContext::CDBLibContext(), CDB_Text::Clone(), CDB_Image::Clone(), CDBConnectionFactory::CMapperFactory::CMapperFactory(), ConvertI2UI(), CTL_Cmd::CTL_Cmd(), CTL_RowResult::CTL_RowResult(), CTL_SendDataCmd::CTL_SendDataCmd(), CTL_RowResult::GetImageOrTextDescriptor(), impl::CDB_Params::GetParamNum(), CTL_LRCmd::MakeResultInternal(), CDBL_CursorCmd::OpenCursor(), CTL_CursorCmdExpl::OpenCursor(), CTL_CursorCmd::OpenCursor(), impl::CDBHandlerStack::Pop(), impl::CDBHandlerStack::Push(), CDBL_LangCmd::Result(), CTL_RPCCmd::Send(), CDBL_LangCmd::Send(), CTL_LangCmd::Send(), CTL_BCPInCmd::Send(), CDBL_SendDataCmd::SendChunk(), CTL_SendDataCmd::SendChunk(), CDBL_Connection::SendDataCmd(), CTL_CursorCmd::x_GetITDescriptor(), CTL_Connection::x_GetNativeITDescriptor(), and CDB_Numeric::x_MakeFromString().

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

Definition at line 596 of file exception.hpp.

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

Definition at line 599 of file exception.hpp.

#define CHECK_DRIVER_WARNING failed,
message,
err_code   )     if ( ( failed ) ) { DATABASE_DRIVER_WARNING( message, err_code ); }
 

Definition at line 593 of file exception.hpp.

Referenced by CDB_SendDataCmd::Cancel(), CDBL_LangCmd::Result(), and CDB_SendDataCmd::SendChunk().

#define DATABASE_DRIVER_ERROR message,
err_code   )     NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Error )
 

Definition at line 565 of file exception.hpp.

Referenced by CTL_BCPInCmd::AddHint(), CDBL_Result::AltGetItem(), CDB_Double::AssignValue(), CDB_Float::AssignValue(), CDB_BigInt::AssignValue(), CDB_SmallInt::AssignValue(), CDB_Int::AssignValue(), CODBC_Connection::BCPIn(), CDBParams::Bind(), CTL_LRCmd::Cancel(), CTL_BCPInCmd::Cancel(), CBlobStoreDynamic::CBlobStoreDynamic(), 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_LRCmd::CheckSFB(), CTL_CursorCmd::CheckSFB(), CTL_Connection::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(), CODBC_BCPInCmd::CommitBCPTrans(), CDBL_BCPInCmd::CommitBCPTrans(), CTL_BCPInCmd::CommitBCPTrans(), ctlib::Connection::Connection(), CDB_Object::Create(), CTL_SendDataCmd::CTL_SendDataCmd(), CTLibContext::CTLibContext(), impl::CWinSock::CWinSock(), CBlobStoreBase::Delete(), CODBC_BCPInCmd::EndBCP(), CDBL_BCPInCmd::EndBCP(), CBlobStoreBase::Exists(), CODBC_RowResult::Fetch(), CDBL_CursorResult::Fetch(), CDBL_ComputeResult::Fetch(), CDBL_BlobResult::Fetch(), CDBL_RowResult::Fetch(), Get_I_DriverContext(), CBlobStoreDynamic::GetConn(), CBlobStoreStatic::GetConn(), ctlib::Connection::GetCTLConn(), impl::CDBBindedParams::GetDataType(), impl::CDBBindedParams::GetDirection(), C_xDriverMgr::GetDriverContext(), CODBC_RowResult::GetImageOrTextDescriptor(), CTL_RowResult::GetImageOrTextDescriptor(), impl::CDBBindedParams::GetIndex(), CDBL_StatusResult::GetItem(), CDBL_BlobResult::GetItem(), CTL_CursorResultExpl::GetItem(), CDBL_Result::GetItemInternal(), CTL_RowResult::GetItemInternal(), impl::CDBBindedParams::GetMaxSize(), impl::CDBBindedParams::GetName(), impl::CDBBindedParams::GetNum(), impl::CDB_Params::GetParamNum(), CDB_Object::GetTypeName(), impl::CRowInfo_SP_SQL_Server::Initialize(), make_server(), impl::CDriverContext::MakeConnection(), MakeDriverContext(), CTL_LRCmd::MakeResultInternal(), CODBC_RowResult::ReadItem(), CDBL_BlobResult::ReadItem(), CTL_RowResult::ReadItem(), CBlobStoreBase::ReadTableDescr(), value_slice::ReportTypeConvError(), CODBC_RPCCmd::Result(), CDBL_RPCCmd::Result(), CODBC_LangCmd::Result(), CDBL_LangCmd::Result(), CDBL_Result::RetGetItem(), s_GenericGetItem(), CODBC_RPCCmd::Send(), CDBL_RPCCmd::Send(), CODBC_LangCmd::Send(), CDBL_LangCmd::Send(), CODBC_BCPInCmd::Send(), CDBL_BCPInCmd::Send(), CODBC_SendDataCmd::SendChunk(), CDBL_SendDataCmd::SendChunk(), CTL_SendDataCmd::SendChunk(), CTL_LRCmd::SendInternal(), CDBParams::Set(), CTL_BCPInCmd::SetHints(), CBlobStoreBase::SetTableDescr(), CBlobStoreBase::SetTextSizeServerSide(), CDBL_BlobResult::SkipItem(), CTL_CursorResult::SkipItem(), CDBL_LangCmd::x_AssignParams(), CDBL_CursorCmd::x_AssignParams(), CTL_CursorCmdExpl::x_AssignParams(), CDBL_BCPInCmd::x_AssignParams(), CTL_BCPInCmd::x_AssignParams(), CTL_BCPInCmd::x_BlkSetHints(), CDBL_Connection::x_GetNativeITDescriptor(), CODBC_RowResult::x_LoadItem(), CDB_Numeric::x_MakeFromString(), CODBC_RPCCmd::xCheck4MoreResults(), CODBC_LangCmd::xCheck4MoreResults(), and CODBC_RowResult::xGetData().

#define DATABASE_DRIVER_ERROR_EX prev_exception,
message,
err_code   ) 
 

Value:

NCBI_DATABASE_RETHROW( prev_exception, CDB_ClientEx, message, err_code, \
    eDiag_Error )

Definition at line 567 of file exception.hpp.

Referenced by CDBL_CursorResult::CDBL_CursorResult(), CODBC_CursorCmdExpl::CloseCursor(), CTL_CursorCmdExpl::CloseCursor(), CODBC_CursorCmdExpl::Delete(), CODBC_CursorCmd::Delete(), CODBC_CursorCmdExpl::OpenCursor(), CODBC_CursorCmd::OpenCursor(), CDBL_CursorCmd::OpenCursor(), CTL_CursorCmdExpl::OpenCursor(), CODBC_CursorCmdExpl::Update(), and CODBC_CursorCmd::Update().

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

Definition at line 577 of file exception.hpp.

#define DATABASE_DRIVER_FATAL_EX prev_exception,
message,
err_code   ) 
 

Value:

NCBI_DATABASE_RETHROW( prev_exception, CDB_ClientEx, message, err_code, \
    eDiag_Fatal )

Definition at line 579 of file exception.hpp.

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

Definition at line 583 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, \
    eDiag_Info )

Definition at line 585 of file exception.hpp.

#define DATABASE_DRIVER_WARNING message,
err_code   )     NCBI_DATABASE_THROW( CDB_ClientEx, message, err_code, eDiag_Warning )
 

Definition at line 571 of file exception.hpp.

Referenced by CMySQL_Connection::CMySQL_Connection(), CMySQL_RowResult::CMySQL_RowResult(), CMySQL_RowResult::Fetch(), CTL_LRCmd::MakeResultInternal(), CDBL_RPCCmd::Result(), and CMySQL_LangCmd::Send().

#define DATABASE_DRIVER_WARNING_EX prev_exception,
message,
err_code   ) 
 

Value:

NCBI_DATABASE_RETHROW( prev_exception, CDB_ClientEx, message, err_code, \
    eDiag_Warning )

Definition at line 573 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 53 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 )

Definition at line 561 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 )
Generic macro to throw a database exception, given the exception class, database error code and message string.

Definition at line 557 of file exception.hpp.


Typedef Documentation

typedef CDB_UserHandler_Diag CDB_UserHandler_Default
 

Definition at line 552 of file exception.hpp.


Enumeration Type Documentation

enum EDB_Severity
 

Enumerator:
eDB_Info 
eDB_Warning 
eDB_Error 
eDB_Fatal 
eDB_Unknown 

Definition at line 89 of file exception.hpp.


Generated on Mon Dec 7 16:02:17 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:24:36 2009 by modify_doxy.py rev. 173732