Concept An object that records a single database exception. More...
#include <TDbiException.hxx>
Public Member Functions | |
TDbiException (const char *msg=0, Int_t code=-1) | |
TDbiException (const TSQLServer &server) | |
Create an exception, getting the error message and code from server. | |
TDbiException (const TSQLStatement &statement) | |
Create and exception, taking the message and code from statement. | |
TDbiException (const TDbiException &that) | |
virtual | ~TDbiException () |
const std::string & | GetMessage () const |
Int_t | GetErrorCode () const |
Private Attributes | |
std::string | fMessage |
The message associated with the exception. | |
Int_t | fErrorCode |
The exception error code. |
Concept An object that records a single database exception.
PurposeTo provide a place to record an exception. Currently it is embedded in TSQLServer and TSQStatement. Each exception has an associated message string and error code. Contact: A.Finch@lancaster.ac.uk
Definition at line 36 of file TDbiException.hxx.
TDbiException::TDbiException | ( | const char * | msg = 0 , |
|
Int_t | code = -1 | |||
) |
TDbiException::TDbiException | ( | const TSQLServer & | server | ) |
Create an exception, getting the error message and code from server.
Definition at line 40 of file TDbiException.cxx.
References SK_DBI_Trace.
00040 : 00041 fMessage(server.GetErrorMsg()), 00042 fErrorCode(server.GetErrorCode()) 00043 { 00044 00045 SK_DBI_Trace( "Creating TDbiException" << " "); 00046 00047 }
TDbiException::TDbiException | ( | const TSQLStatement & | statement | ) |
Create and exception, taking the message and code from statement.
Definition at line 51 of file TDbiException.cxx.
References SK_DBI_Trace.
00051 : 00052 fMessage(statement.GetErrorMsg()), 00053 fErrorCode(statement.GetErrorCode()) 00054 { 00055 00056 SK_DBI_Trace( "Creating TDbiException" << " "); 00057 00058 }
TDbiException::TDbiException | ( | const TDbiException & | that | ) |
Definition at line 63 of file TDbiException.cxx.
References SK_DBI_Trace.
00064 { 00065 00066 SK_DBI_Trace( "Creating TDbiException" << " "); 00067 00068 *this = that; 00069 00070 }
TDbiException::~TDbiException | ( | ) | [virtual] |
Definition at line 75 of file TDbiException.cxx.
References SK_DBI_Trace.
00075 { 00076 00077 00078 SK_DBI_Trace( "Destroying TDbiException" << " "); 00079 00080 }
Int_t TDbiException::GetErrorCode | ( | ) | const [inline] |
Definition at line 50 of file TDbiException.hxx.
References fErrorCode.
Referenced by operator<<().
00050 { return fErrorCode; }
const std::string& TDbiException::GetMessage | ( | ) | const [inline] |
Definition at line 49 of file TDbiException.hxx.
References fMessage.
Referenced by operator<<().
00049 { return fMessage; }
Int_t TDbiException::fErrorCode [private] |
The exception error code.
Definition at line 63 of file TDbiException.hxx.
Referenced by GetErrorCode().
std::string TDbiException::fMessage [private] |
The message associated with the exception.
Definition at line 60 of file TDbiException.hxx.
Referenced by GetMessage().