Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

lExceptions.h

Go to the documentation of this file.
00001 /******************************************************************************/
00002 /*                                                                            */
00003 /* POLiTe - Persistent Object Library Test                                    */
00004 /*                                        Ph.D. Thesis by Mgr. Michal Kopecky */
00005 /*                                                                            */
00006 /* Charles University Prague                                                  */
00007 /*                                                                            */
00008 /******************************************************************************/
00009 /*                                                                            */
00010 /* File name: ... lExceptions.h                                               */
00011 /* Module: ...... none                                                        */
00012 /*                                                                            */
00013 /******************************************************************************/
00014 /*                                                                            */
00015 /* Declares the class interfaces for the exceptions.                          */
00016 /* It is intended to serve as a starting-point for exception handling.        */
00017 /*                                                                            */
00018 /******************************************************************************/
00019 
00020 #ifndef __L_EXCEPTIONS_H__
00021 #define __L_EXCEPTIONS_H__
00022 
00023 // Common POLiTe Header(s)
00024 #include <lDefs.h>
00025 #include <lTrace.h>
00026 
00028 // During an execution of POLiTe based application, some exceptions may appear
00029 // due to an incorrect work of database server, network layers of software,
00030 // incorrect use of POLiTe services, insufficient amount of resources (memory),
00031 // etc. These exceptions are described below.
00032 
00033 class DLL_External ObjLibException {
00034 public:
00035   ObjLibException();                    // constructor
00036   virtual ~ObjLibException();           // destructor
00037   virtual const char *Name() = 0;       // Returns name of exception as a string
00038 };
00039 
00041 // GEN.LIB can't communicate with the database server.
00042 
00043 class DLL_External ObjLibException_ConnectionError : public ObjLibException {
00044 public:
00045   ObjLibException_ConnectionError();           // constructor
00046   virtual ~ObjLibException_ConnectionError();  // destructor
00047   virtual const char *Name() {return "ConnectionError";};
00048   // Returns name of exception as a string
00049 };
00050 
00052 // Required functionality is not supported on the used database server engine.
00053 
00054 class DLL_External ObjLibException_NotSupported : public ObjLibException {
00055 public:
00056   ObjLibException_NotSupported();            // constructor
00057   virtual ~ObjLibException_NotSupported();   // destructor
00058   virtual const char *Name() {return "NotSupported";};
00059   // Returns name of exception as a string
00060 };
00061 
00063 // Database server does not recognise SQL command due either syntax error, or
00064 // semantic error (table not exists, etc.).
00065 
00066 class DLL_External ObjLibException_SqlError : public ObjLibException {
00067 public:
00068   ObjLibException_SqlError();                           // constructor
00069   virtual ~ObjLibException_SqlError();                  // destructor
00070   virtual const char *Name() {return "SqlError";};
00071   // Returns name of exception as a string
00072 };
00073 
00075 // The specified object can’t be retrieved from database because table row,
00076 //representing object is locked by another connection.
00077 
00078 class DLL_External ObjLibException_DatabaseLock : public ObjLibException {
00079 public:
00080   ObjLibException_DatabaseLock();            // constructor
00081   virtual ~ObjLibException_DatabaseLock();   // destructor
00082   virtual const char *Name() {return "DatabaseLock";};
00083   // Returns name of exception as a string
00084 };
00085 
00087 // The specified object can’t be freed, because it is currently locked on
00088 //a fixed address of memory.
00089 
00090 class DLL_External ObjLibException_MemoryLock : public ObjLibException {
00091 public:
00092   ObjLibException_MemoryLock();                 // constructor
00093   virtual ~ObjLibException_MemoryLock();        // destructor
00094   virtual const char *Name() {return "MemoryLock";};
00095   // Returns name of exception as a string
00096 };
00097 
00099 // There is not enough memory to complete operation.
00100 
00101 class DLL_External ObjLibException_NoMemory : public ObjLibException {
00102 public:
00103   ObjLibException_NoMemory();           // constructor
00104   virtual ~ObjLibException_NoMemory();  // destructor
00105   virtual const char *Name() {return "NoMemory";};
00106   // Returns name of exception as a string
00107 };
00108 
00110 // Specified data are not found.
00111 
00112 class DLL_External ObjLibException_NotFound : public ObjLibException {
00113 public:
00114   ObjLibException_NotFound();           // constructor
00115   virtual ~ObjLibException_NotFound();  // destructor
00116   virtual const char *Name() {return "NotFound";};
00117   // Returns name of exception as a string
00118 };
00119 
00120 #endif  //__L_EXCEPTIONS_H__

Generated on Sun Jul 14 20:51:15 2002 for POLiTe by doxygen1.2.16