DbiExceptionLog Class Reference

#include <DbiExceptionLog.h>

List of all members.

Public Member Functions

 DbiExceptionLog (const DbiException *e=0)
virtual ~DbiExceptionLog ()
Bool_t IsEmpty () const
const std::vector< DbiException > & GetEntries () const
void Print () const
UInt_t Size () const
void Copy (DbiExceptionLog &that, UInt_t start=0) const
void AddLog (const DbiExceptionLog &el)
void AddEntry (const DbiException &e)
void AddEntry (const char *errMsg, Int_t code=-1, Int_t dbType=-1)
void AddEntry (const std::string &errMsg, Int_t code=-1, Int_t dbType=-1)
void AddEntry (const TSQLServer &server, Int_t dbType=-1)
void AddEntry (const TSQLStatement &statement, Int_t dbType=-1)
void Clear ()

Static Public Member Functions

static DbiExceptionLogGetGELog ()

Private Attributes

std::vector< DbiExceptionfEntries
 The exception entries.

Static Private Attributes

static DbiExceptionLog fgGELog
 Global Exception Log.

Detailed Description

Id
DbiExceptionLog.h,v 1.5 2007/04/26 14:19:57 west Exp

Definition at line 44 of file DbiExceptionLog.h.


Constructor & Destructor Documentation

DbiExceptionLog::DbiExceptionLog ( const DbiException e = 0  ) 

Definition at line 30 of file DbiExceptionLog.cxx.

References Msg::kVerbose, LEA_CTOR, and MSG.

00030                                                       {
00031 
00032   LEA_CTOR    //Leak Checker
00033   MSG("Dbi", Msg::kVerbose) << "Creating DbiExceptionLog" << endl;
00034   if ( e ) this->AddEntry(*e);
00035 
00036 }

DbiExceptionLog::~DbiExceptionLog (  )  [virtual]

Definition at line 40 of file DbiExceptionLog.cxx.

References Msg::kVerbose, LEA_DTOR, and MSG.

00040                                   {
00041 
00042 
00043   LEA_DTOR    //Leak Checker
00044   MSG("Dbi", Msg::kVerbose) << "Destroying DbiExceptionLog" << endl;
00045 
00046 }


Member Function Documentation

void DbiExceptionLog::AddEntry ( const TSQLStatement &  statement,
Int_t  dbType = -1 
) [inline]

Definition at line 71 of file DbiExceptionLog.h.

References AddEntry().

00071                                                                   {
00072    this->AddEntry(DbiException(statement,dbType));}

void DbiExceptionLog::AddEntry ( const TSQLServer &  server,
Int_t  dbType = -1 
) [inline]

Definition at line 69 of file DbiExceptionLog.h.

References AddEntry().

00069                                                             {
00070    this->AddEntry(DbiException(server,dbType));}

void DbiExceptionLog::AddEntry ( const std::string &  errMsg,
Int_t  code = -1,
Int_t  dbType = -1 
) [inline]

Definition at line 67 of file DbiExceptionLog.h.

References AddEntry().

00067                                                                             {
00068    this->AddEntry(DbiException(errMsg.c_str(),code,dbType));}

void DbiExceptionLog::AddEntry ( const char *  errMsg,
Int_t  code = -1,
Int_t  dbType = -1 
) [inline]

Definition at line 65 of file DbiExceptionLog.h.

References AddEntry().

00065                                                                        {
00066    this->AddEntry(DbiException(errMsg,code,dbType));}

void DbiExceptionLog::AddEntry ( const DbiException e  )  [inline]
void DbiExceptionLog::AddLog ( const DbiExceptionLog el  ) 

Definition at line 71 of file DbiExceptionLog.cxx.

References AddEntry(), and GetEntries().

Referenced by DbiStatement::AppendExceptionLog(), and DbiStatement::PrintExceptions().

00071                                                       {
00072 //
00073 //
00074 //  Purpose:  Add all entries from el.
00075 
00076   const std::vector<DbiException>& ve = el.GetEntries();
00077   std::vector<DbiException>::const_iterator itr(ve.begin()), itrEnd(ve.end());
00078   while ( itr != itrEnd ) this->AddEntry(*itr++);
00079 
00080 }

void DbiExceptionLog::Clear (  )  [inline]
void DbiExceptionLog::Copy ( DbiExceptionLog that,
UInt_t  start = 0 
) const

Definition at line 84 of file DbiExceptionLog.cxx.

References AddEntry(), and fEntries.

Referenced by DbiResult::CaptureExceptionLog().

00084                                                                     {
00085 //
00086 //
00087 //  Purpose: Copy exception log starting at 'start' (default 0)
00088 
00089   UInt_t maxEntry = fEntries.size();
00090   while (start <= maxEntry ) that.AddEntry(fEntries[start++]);
00091 
00092 }

const std::vector<DbiException>& DbiExceptionLog::GetEntries (  )  const [inline]

Definition at line 56 of file DbiExceptionLog.h.

References fEntries.

Referenced by AddLog(), and operator<<().

00056 { return fEntries; }

static DbiExceptionLog& DbiExceptionLog::GetGELog (  )  [inline, static]
Bool_t DbiExceptionLog::IsEmpty (  )  const [inline]
void DbiExceptionLog::Print (  )  const

Definition at line 95 of file DbiExceptionLog.cxx.

Referenced by DbiTableProxyRegistry::~DbiTableProxyRegistry().

00095                                    {
00096 //
00097 //
00098 //  Purpose:  Print contents to cout.
00099 
00100   std::cout << *this << std::endl;
00101 
00102 }

UInt_t DbiExceptionLog::Size ( void   )  const [inline]

Definition at line 58 of file DbiExceptionLog.h.

References fEntries.

Referenced by DbiConnection::PrintExceptionLog(), DbiTableProxy::Query(), and DbiTableProxyRegistry::~DbiTableProxyRegistry().

00058 { return fEntries.size(); }


Member Data Documentation

std::vector<DbiException> DbiExceptionLog::fEntries [private]

The exception entries.

Definition at line 86 of file DbiExceptionLog.h.

Referenced by AddEntry(), Clear(), Copy(), GetEntries(), IsEmpty(), and Size().

Global Exception Log.

Definition at line 89 of file DbiExceptionLog.h.

Referenced by GetGELog().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1