TDbiExceptionLog Class Reference

Concept An object that records database exceptions More...

#include <TDbiExceptionLog.hxx>

Collaboration diagram for TDbiExceptionLog:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TDbiExceptionLog (const TDbiException *e=0)
virtual ~TDbiExceptionLog ()
Bool_t IsEmpty () const
const std::vector
< TDbiException > & 
GetEntries () const
void Print () const
 Purpose: Print contents to cout.
UInt_t Size () const
void Copy (TDbiExceptionLog &that, UInt_t start=0) const
 Purpose: Copy exception log starting at 'start' (default 0).
void AddLog (const TDbiExceptionLog &el)
void AddEntry (const TDbiException &e)
void AddEntry (const char *errMsg, Int_t code=-1)
void AddEntry (const std::string &errMsg, Int_t code=-1)
void AddEntry (const TSQLServer &server)
void AddEntry (const TSQLStatement &statement)
void Clear ()

Static Public Member Functions

static TDbiExceptionLogGetGELog ()

Private Attributes

std::vector< TDbiExceptionfEntries
 The exception entries.

Static Private Attributes

static TDbiExceptionLog fgGELog
 Global Exception Log.

Detailed Description

Concept An object that records database exceptions

Id
TDbiExceptionLog.hxx,v 1.1 2011/01/18 05:49:19 finch Exp

PurposeTo provide a place to record (in memory) exceptions from the time they arise in the lower levels of the DBI and below until they can be analysed in the upper levels of the DBI and beyond. They are stored in a std::vector of TDbiException s Contact: A.Finch@lancaster.ac.uk

Definition at line 47 of file TDbiExceptionLog.hxx.


Constructor & Destructor Documentation

TDbiExceptionLog::TDbiExceptionLog ( const TDbiException e = 0  ) 
TDbiExceptionLog::~TDbiExceptionLog (  )  [virtual]

Definition at line 39 of file TDbiExceptionLog.cxx.

References SK_DBI_Trace.

00039                                     {
00040 
00041 
00042   SK_DBI_Trace( "Destroying TDbiExceptionLog" << "  ");
00043 
00044 }


Member Function Documentation

void TDbiExceptionLog::AddEntry ( const TSQLStatement &  statement  )  [inline]

Definition at line 74 of file TDbiExceptionLog.hxx.

References AddEntry().

00074                                                {
00075    this->AddEntry(TDbiException(statement));}

Here is the call graph for this function:

void TDbiExceptionLog::AddEntry ( const TSQLServer &  server  )  [inline]

Definition at line 72 of file TDbiExceptionLog.hxx.

References AddEntry().

00072                                          {
00073    this->AddEntry(TDbiException(server));}

Here is the call graph for this function:

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

Definition at line 70 of file TDbiExceptionLog.hxx.

References AddEntry().

00070                                                          {
00071    this->AddEntry(TDbiException(errMsg.c_str(),code));}

Here is the call graph for this function:

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

Definition at line 68 of file TDbiExceptionLog.hxx.

References AddEntry().

00068                                                     {
00069    this->AddEntry(TDbiException(errMsg,code));}

Here is the call graph for this function:

void TDbiExceptionLog::AddEntry ( const TDbiException e  )  [inline]
void TDbiExceptionLog::AddLog ( const TDbiExceptionLog el  ) 

Purpose: Add all entries from el.

Definition at line 71 of file TDbiExceptionLog.cxx.

References AddEntry(), and GetEntries().

Referenced by TDbiStatement::AppendExceptionLog(), and TDbiAsciiDbImporter::LoadTable().

00071                                                         {
00072 
00073   const std::vector<TDbiException>& ve = el.GetEntries();
00074   std::vector<TDbiException>::const_iterator itr(ve.begin()), itrEnd(ve.end());
00075   while ( itr != itrEnd ) this->AddEntry(*itr++);
00076 
00077 }

Here is the call graph for this function:

Here is the caller graph for this function:

void TDbiExceptionLog::Clear (  )  [inline]

Definition at line 76 of file TDbiExceptionLog.hxx.

References fEntries.

Referenced by TDbiResultSet::CaptureExceptionLog(), TDbiStatement::ClearExceptionLog(), and TDbiConnection::ClearExceptionLog().

00076 { fEntries.clear(); }

Here is the caller graph for this function:

void TDbiExceptionLog::Copy ( TDbiExceptionLog that,
UInt_t  start = 0 
) const

Purpose: Copy exception log starting at 'start' (default 0).

Definition at line 81 of file TDbiExceptionLog.cxx.

References AddEntry(), and fEntries.

Referenced by TDbiResultSet::CaptureExceptionLog().

00081                                                                       {
00082 //
00083 //
00084 
00085 
00086   UInt_t maxEntry = fEntries.size();
00087   while (start <= maxEntry ) that.AddEntry(fEntries[start++]);
00088 
00089 }

Here is the call graph for this function:

Here is the caller graph for this function:

const std::vector<TDbiException>& TDbiExceptionLog::GetEntries (  )  const [inline]

Definition at line 59 of file TDbiExceptionLog.hxx.

References fEntries.

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

00059 { return fEntries; }

Here is the caller graph for this function:

static TDbiExceptionLog& TDbiExceptionLog::GetGELog (  )  [inline, static]

Definition at line 79 of file TDbiExceptionLog.hxx.

References fgGELog.

Referenced by TDbiResultSet::CaptureExceptionLog(), TDbiTableProxy::Query(), and TDbiDatabaseManager::~TDbiDatabaseManager().

00079 { return fgGELog;}

Here is the caller graph for this function:

Bool_t TDbiExceptionLog::IsEmpty (  )  const [inline]

Definition at line 57 of file TDbiExceptionLog.hxx.

References fEntries.

Referenced by TDbiStatement::ExecuteQuery(), TDbiStatement::ExecuteUpdate(), TDbiAsciiDbImporter::LoadTable(), operator<<(), TDbiStatement::PrintExceptions(), and TDbiCascader::Lock::SetLock().

00057 { return fEntries.size() == 0; }

Here is the caller graph for this function:

void TDbiExceptionLog::Print (  )  const

Purpose: Print contents to cout.

Definition at line 92 of file TDbiExceptionLog.cxx.

Referenced by TDbiDatabaseManager::~TDbiDatabaseManager().

00092                                     {
00093 //
00094 //
00095 
00096 
00097   std::cout << *this << std::endl;
00098 
00099 }

Here is the caller graph for this function:

UInt_t TDbiExceptionLog::Size (  )  const [inline]

Definition at line 61 of file TDbiExceptionLog.hxx.

References fEntries.

Referenced by TDbiConnection::PrintExceptionLog(), and TDbiTableProxy::Query().

00061 { return fEntries.size(); }

Here is the caller graph for this function:


Member Data Documentation

std::vector<TDbiException> TDbiExceptionLog::fEntries [private]

The exception entries.

Definition at line 89 of file TDbiExceptionLog.hxx.

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

Global Exception Log.

Definition at line 92 of file TDbiExceptionLog.hxx.

Referenced by GetGELog().


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

Generated on 11 Aug 2013 for SKDatabase by  doxygen 1.6.1