TDbiException.hxx

Go to the documentation of this file.
00001 #ifndef DBIEXCEPTION
00002 #define DBIEXCEPTION
00003 
00004 
00005 /**
00006  *
00007  *
00008  * \class TDbiException
00009  *
00010  *
00011  * \brief
00012  * <b>Concept</b> An object that records a single database exception.
00013  *
00014  * \brief
00015  * <b>Purpose</b>To provide a place to record an exception.  Currently
00016  * it is embedded in TSQLServer and TSQStatement. Each exception has an associated message string
00017  * and error code.
00018  *
00019  * Contact: A.Finch@lancaster.ac.uk
00020  *
00021  *
00022  */
00023 
00024 #include <iosfwd>
00025 #include <string>
00026 #include "Rtypes.h"
00027 
00028 class TDbiException;
00029 class TSQLServer;
00030 class TSQLStatement;
00031 
00032 class ostreamx;
00033 
00034 std::ostream& operator<<(std::ostream& s, const TDbiException& e);
00035 
00036 class TDbiException
00037 
00038 {
00039 
00040 public:
00041   TDbiException(const char* msg = 0, Int_t code = -1);
00042   TDbiException(const TSQLServer& server);
00043   TDbiException(const TSQLStatement& statement);
00044   TDbiException(const TDbiException& that);
00045   virtual ~TDbiException();
00046 
00047 // State testing member functions
00048 
00049   const std::string & GetMessage() const { return fMessage; }
00050            Int_t GetErrorCode() const { return fErrorCode; }
00051 
00052  private:
00053 
00054 
00055 // Data members
00056 
00057 private:
00058 
00059 /// The message associated with the exception.
00060   std::string fMessage;
00061 
00062 /// The exception error code.
00063   Int_t fErrorCode;
00064 
00065 
00066  ClassDef(TDbiException,0) // Object to hold a single database exception record.
00067 
00068 };
00069 
00070 
00071 #endif // DBIEXCEPTIONLOG
00072 

Generated on 11 Aug 2013 for SKDatabase by  doxygen 1.6.1