NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CSraException Class Reference

Search Toolkit Book for CSraException

#include <sra/readers/sra/exception.hpp>

+ Inheritance diagram for CSraException:
+ Collaboration diagram for CSraException:

Public Types

enum  EErrCode {
  eOtherError , eNullPtr , eAddRefFailed , eInvalidArg ,
  eInitFailed , eNotFound , eInvalidState , eInvalidIndex ,
  eNotFoundDb , eNotFoundTable , eNotFoundColumn , eNotFoundValue ,
  eDataError , eNotFoundIndex , eProtectedDb , eTimeout ,
  eUnknownError
}
 Error types that corelib can generate. More...
 
typedef int TErrCode
 Translate from the error code value to its string representation. More...
 

Public Member Functions

 CSraException (const CDiagCompileInfo &info, const CException *prev_exception, EErrCode err_code, const string &message, EDiagSev severity=eDiag_Error)
 Constructors. More...
 
 CSraException (const CDiagCompileInfo &info, const CException *prev_exception, EErrCode err_code, const string &message, rc_t rc, EDiagSev severity=eDiag_Error)
 
 CSraException (const CDiagCompileInfo &info, const CException *prev_exception, EErrCode err_code, const string &message, rc_t rc, const string &param, EDiagSev severity=eDiag_Error)
 
 CSraException (const CDiagCompileInfo &info, const CException *prev_exception, EErrCode err_code, const string &message, rc_t rc, int64_t param, EDiagSev severity=eDiag_Error)
 
 CSraException (const CSraException &other)
 
 ~CSraException (void) noexcept
 
virtual void ReportExtra (ostream &out) const
 Report "non-standard" attributes. More...
 
virtual const char * GetType (void) const
 
virtual TErrCode GetErrCode (void) const
 
virtual const char * GetErrCodeString (void) const
 Translate from the error code value to its string representation. More...
 
rc_t GetRC (void) const
 
const stringGetParam (void) const
 
void SetParam (const string &param)
 

Static Public Member Functions

static bool IsTimeout (rc_t rc)
 
static void ReportError (const char *msg, rc_t rc)
 

Protected Member Functions

 CSraException (void)
 Constructor. More...
 
virtual const CExceptionx_Clone (void) const
 Helper clone method. More...
 

Private Attributes

rc_t m_RC
 
string m_Param
 

Detailed Description

Definition at line 76 of file exception.hpp.

Member Typedef Documentation

◆ TErrCode

Translate from the error code value to its string representation.

Definition at line 138 of file exception.hpp.

Member Enumeration Documentation

◆ EErrCode

Error types that corelib can generate.

These generic error conditions can occur for corelib applications.

Enumerator
eOtherError 
eNullPtr 

Null pointer error.

eAddRefFailed 

AddRef failed.

eInvalidArg 

Invalid argument error.

eInitFailed 

Initialization failed.

eNotFound 

Data not found.

eInvalidState 

State of object is invalid for the operation.

eInvalidIndex 

Invalid index for array-like retrieval.

eNotFoundDb 

DB main file not found.

eNotFoundTable 

DB table not found.

eNotFoundColumn 

DB column not found.

eNotFoundValue 

DB value not found.

eDataError 

VDB data is incorrect.

eNotFoundIndex 

VDB index not found.

eProtectedDb 

DB is protected.

eTimeout 

timeout, re-try logic is recommended

eUnknownError 

Not used.

Definition at line 83 of file exception.hpp.

Constructor & Destructor Documentation

◆ CSraException() [1/6]

CSraException::CSraException ( const CDiagCompileInfo info,
const CException prev_exception,
EErrCode  err_code,
const string message,
EDiagSev  severity = eDiag_Error 
)

Constructors.

Definition at line 78 of file sraread.cpp.

References info.

◆ CSraException() [2/6]

CSraException::CSraException ( const CDiagCompileInfo info,
const CException prev_exception,
EErrCode  err_code,
const string message,
rc_t  rc,
EDiagSev  severity = eDiag_Error 
)

Definition at line 91 of file sraread.cpp.

References info.

◆ CSraException() [3/6]

CSraException::CSraException ( const CDiagCompileInfo info,
const CException prev_exception,
EErrCode  err_code,
const string message,
rc_t  rc,
const string param,
EDiagSev  severity = eDiag_Error 
)

Definition at line 105 of file sraread.cpp.

References info.

◆ CSraException() [4/6]

CSraException::CSraException ( const CDiagCompileInfo info,
const CException prev_exception,
EErrCode  err_code,
const string message,
rc_t  rc,
int64_t  param,
EDiagSev  severity = eDiag_Error 
)

Definition at line 121 of file sraread.cpp.

References info.

◆ CSraException() [5/6]

CSraException::CSraException ( const CSraException other)

Definition at line 137 of file sraread.cpp.

References x_Assign().

◆ ~CSraException()

CSraException::~CSraException ( void  )
noexcept

Definition at line 146 of file sraread.cpp.

◆ CSraException() [6/6]

CSraException::CSraException ( void  )
protected

Constructor.

Definition at line 72 of file sraread.cpp.

Referenced by GetErrCode(), and x_Clone().

Member Function Documentation

◆ GetErrCode()

CSraException::TErrCode CSraException::GetErrCode ( void  ) const
virtual

◆ GetErrCodeString()

const char * CSraException::GetErrCodeString ( void  ) const
virtual

◆ GetParam()

const string& CSraException::GetParam ( void  ) const
inline

Definition at line 149 of file exception.hpp.

References m_Param.

Referenced by CCSraDb_Impl::CCSraDb_Impl(), and CWGSFileInfo::Open().

◆ GetRC()

rc_t CSraException::GetRC ( void  ) const
inline

◆ GetType()

const char * CSraException::GetType ( void  ) const
virtual

Definition at line 157 of file sraread.cpp.

◆ IsTimeout()

bool CSraException::IsTimeout ( rc_t  rc)
static

Definition at line 224 of file sraread.cpp.

◆ ReportError()

void CSraException::ReportError ( const char *  msg,
rc_t  rc 
)
static

Definition at line 218 of file sraread.cpp.

References ERR_POST_X.

Referenced by CSraRef< VFSManager >::Release().

◆ ReportExtra()

void CSraException::ReportExtra ( ostream &  out) const
virtual

Report "non-standard" attributes.

Definition at line 204 of file sraread.cpp.

References m_Param, m_RC, and out().

◆ SetParam()

void CSraException::SetParam ( const string param)
inline

Definition at line 153 of file exception.hpp.

References m_Param.

Referenced by CWGSFileInfo::Open().

◆ x_Clone()

const CException * CSraException::x_Clone ( void  ) const
protectedvirtual

Helper clone method.

Definition at line 151 of file sraread.cpp.

References CSraException().

Member Data Documentation

◆ m_Param

string CSraException::m_Param
private

Definition at line 171 of file exception.hpp.

Referenced by GetParam(), ReportExtra(), and SetParam().

◆ m_RC

rc_t CSraException::m_RC
private

Definition at line 170 of file exception.hpp.

Referenced by GetRC(), and ReportExtra().


The documentation for this class was generated from the following files:
Modified on Sun Apr 14 05:25:11 2024 by modify_doxy.py rev. 669887