$treeview $search $mathjax
StdAir Logo  1.00.1
$projectbrief
$projectbrief
$searchbox

stdair/stdair_exceptions.hpp

Go to the documentation of this file.
00001 #ifndef __STDAIR_STDAIR_EXCEPTIONS_HPP
00002 #define __STDAIR_STDAIR_EXCEPTIONS_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <string>
00009 
00010 namespace stdair {
00011 
00019   class RootException : public std::exception { 
00020   public:
00024     RootException (const std::string& iWhat) : _what (iWhat) {}
00028     RootException() : _what ("No further details") {}
00029     
00033     virtual ~RootException() throw() {}
00034     
00038     const char* what() const throw() {
00039       return _what.c_str();
00040     }
00041     
00042   protected:
00046     std::string _what;
00047   };
00048   
00050   class FileNotFoundException : public RootException { 
00051   public:
00053     FileNotFoundException (const std::string& iWhat) : RootException (iWhat) {}
00054   };
00055   
00057   class NonInitialisedLogServiceException : public RootException { 
00058   public:
00060     NonInitialisedLogServiceException (const std::string& iWhat) 
00061       : RootException (iWhat) {}
00062   };
00063   
00065   class NonInitialisedServiceException : public RootException {
00066   public:
00068     NonInitialisedServiceException (const std::string& iWhat) 
00069       : RootException (iWhat) {}
00070   };
00071   
00073   class NonInitialisedContainerException : public RootException { 
00074   public:
00076     NonInitialisedContainerException (const std::string& iWhat) 
00077       : RootException (iWhat) {}
00078   };
00079   
00081   class NonInitialisedRelationShipException : public RootException { 
00082   public:
00084     NonInitialisedRelationShipException (const std::string& iWhat) 
00085       : RootException (iWhat) {}
00086   };
00087   
00089   class MemoryAllocationException : public RootException { 
00090   public:
00092     MemoryAllocationException (const std::string& iWhat) 
00093       : RootException (iWhat) {}
00094   };
00095   
00097   class ObjectLinkingException : public RootException { 
00098   public:
00100     ObjectLinkingException (const std::string& iWhat) : RootException (iWhat) {}
00101   };
00102   
00104   class DocumentNotFoundException : public RootException {
00105   public:
00107     DocumentNotFoundException (const std::string& iWhat) 
00108       : RootException (iWhat) {}
00109   };
00110   
00112   class ParserException : public RootException { 
00113   public:
00115     ParserException (const std::string& iWhat) : RootException (iWhat) {}
00116   };
00117   
00119   class SerialisationException : public RootException { 
00120   public:
00122     SerialisationException (const std::string& iWhat) : RootException (iWhat) {}
00123   };
00124   
00126   class KeyNotFoundException : public RootException { 
00127   public:
00129     KeyNotFoundException (const std::string& iWhat) : RootException (iWhat) {}
00130   };
00131   
00133   class CodeConversionException : public ParserException {  
00134   public:
00136     CodeConversionException (const std::string& iWhat)
00137       : ParserException (iWhat) {}
00138   };
00139   
00141   class CodeDuplicationException : public ParserException { 
00142   public:
00144     CodeDuplicationException (const std::string& iWhat)
00145       : ParserException(iWhat) {}
00146   };
00147   
00149   class KeyDuplicationException : public ParserException { 
00150   public:
00152     KeyDuplicationException (const std::string& iWhat)
00153       : ParserException(iWhat) {}
00154   };
00155   
00157   class ObjectCreationgDuplicationException : public ParserException {
00158   public:
00160     ObjectCreationgDuplicationException (const std::string& iWhat) 
00161       : ParserException (iWhat) {} 
00162   };
00163   
00165   class ObjectNotFoundException : public RootException {
00166   public:
00168     ObjectNotFoundException (const std::string& iWhat)
00169       : RootException (iWhat) {}
00170   };
00171 
00173   class ParsingFileFailedException : public ParserException {
00174   public:
00176     ParsingFileFailedException (const std::string& iWhat)
00177       : ParserException (iWhat) {}
00178   };
00179   
00181   class SQLDatabaseException : public RootException {
00182   public:
00184     SQLDatabaseException (const std::string& iWhat) : RootException (iWhat) {}
00185   };
00186   
00188   class NonInitialisedDBSessionManagerException : public RootException { 
00189   public:
00191     NonInitialisedDBSessionManagerException (const std::string& iWhat) 
00192       : RootException (iWhat) {}
00193   };
00194   
00196   class SQLDatabaseConnectionImpossibleException : public SQLDatabaseException {
00197   public:
00199     SQLDatabaseConnectionImpossibleException (const std::string& iWhat)
00200       : SQLDatabaseException (iWhat) {}
00201   };
00202 
00204   class EventException : public RootException { 
00205   public:
00207     EventException (const std::string& iWhat) : RootException (iWhat) {}
00208   };
00209 
00211   class SimpleNestingStructException : public RootException { 
00212   public:
00214     SimpleNestingStructException (const std::string& iWhat) 
00215       : RootException (iWhat) {}
00216   };
00217   
00219   class BookingClassListEmptyInNestingStructException : 
00220     public SimpleNestingStructException { 
00221   public:
00223     BookingClassListEmptyInNestingStructException (const std::string& iWhat) 
00224       : SimpleNestingStructException (iWhat) {}
00225   };
00226 
00227 }
00228 #endif // __STDAIR_STDAIR_EXCEPTIONS_HPP