StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
stdair_exceptions.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_STDAIR_EXCEPTIONS_HPP
2 #define __STDAIR_STDAIR_EXCEPTIONS_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 
10 namespace stdair {
11 
19  class RootException : public std::exception {
20  public:
24  RootException (const std::string& iWhat) : _what (iWhat) {}
28  RootException() : _what ("No further details") {}
29 
33  virtual ~RootException() throw() {}
34 
38  const char* what() const throw() {
39  return _what.c_str();
40  }
41 
42  protected:
46  std::string _what;
47  };
48 
51  public:
53  FileNotFoundException (const std::string& iWhat) : RootException (iWhat) {}
54  };
55 
58  public:
60  NonInitialisedLogServiceException (const std::string& iWhat)
61  : RootException (iWhat) {}
62  };
63 
66  public:
68  NonInitialisedServiceException (const std::string& iWhat)
69  : RootException (iWhat) {}
70  };
71 
74  public:
76  NonInitialisedContainerException (const std::string& iWhat)
77  : RootException (iWhat) {}
78  };
79 
82  public:
84  NonInitialisedRelationShipException (const std::string& iWhat)
85  : RootException (iWhat) {}
86  };
87 
90  public:
92  MemoryAllocationException (const std::string& iWhat)
93  : RootException (iWhat) {}
94  };
95 
98  public:
100  ObjectLinkingException (const std::string& iWhat) : RootException (iWhat) {}
101  };
102 
105  public:
107  DocumentNotFoundException (const std::string& iWhat)
108  : RootException (iWhat) {}
109  };
110 
112  class ParserException : public RootException {
113  public:
115  ParserException (const std::string& iWhat) : RootException (iWhat) {}
116  };
117 
120  public:
122  SerialisationException (const std::string& iWhat) : RootException (iWhat) {}
123  };
124 
127  public:
129  KeyNotFoundException (const std::string& iWhat) : RootException (iWhat) {}
130  };
131 
134  public:
136  CodeConversionException (const std::string& iWhat)
137  : ParserException (iWhat) {}
138  };
139 
142  public:
144  CodeDuplicationException (const std::string& iWhat)
145  : ParserException(iWhat) {}
146  };
147 
150  public:
152  KeyDuplicationException (const std::string& iWhat)
153  : ParserException(iWhat) {}
154  };
155 
158  public:
160  ObjectCreationgDuplicationException (const std::string& iWhat)
161  : ParserException (iWhat) {}
162  };
163 
166  public:
168  ObjectNotFoundException (const std::string& iWhat)
169  : RootException (iWhat) {}
170  };
171 
174  public:
176  ParsingFileFailedException (const std::string& iWhat)
177  : ParserException (iWhat) {}
178  };
179 
182  public:
184  SQLDatabaseException (const std::string& iWhat) : RootException (iWhat) {}
185  };
186 
189  public:
191  NonInitialisedDBSessionManagerException (const std::string& iWhat)
192  : RootException (iWhat) {}
193  };
194 
197  public:
199  SQLDatabaseConnectionImpossibleException (const std::string& iWhat)
200  : SQLDatabaseException (iWhat) {}
201  };
202 
204  class EventException : public RootException {
205  public:
207  EventException (const std::string& iWhat) : RootException (iWhat) {}
208  };
209 
212  public:
214  SimpleNestingStructException (const std::string& iWhat)
215  : RootException (iWhat) {}
216  };
217 
221  public:
224  : SimpleNestingStructException (iWhat) {}
225  };
226 
227 }
228 #endif // __STDAIR_STDAIR_EXCEPTIONS_HPP
ParserException(const std::string &iWhat)
RootException(const std::string &iWhat)
FileNotFoundException(const std::string &iWhat)
ObjectCreationgDuplicationException(const std::string &iWhat)
CodeConversionException(const std::string &iWhat)
Handle on the StdAir library context.
Root of the stdair exceptions.
MemoryAllocationException(const std::string &iWhat)
NonInitialisedContainerException(const std::string &iWhat)
CodeDuplicationException(const std::string &iWhat)
DocumentNotFoundException(const std::string &iWhat)
KeyDuplicationException(const std::string &iWhat)
ObjectLinkingException(const std::string &iWhat)
NonInitialisedRelationShipException(const std::string &iWhat)
NonInitialisedDBSessionManagerException(const std::string &iWhat)
SQLDatabaseConnectionImpossibleException(const std::string &iWhat)
NonInitialisedLogServiceException(const std::string &iWhat)
KeyNotFoundException(const std::string &iWhat)
const char * what() const
ObjectNotFoundException(const std::string &iWhat)
EventException(const std::string &iWhat)
ParsingFileFailedException(const std::string &iWhat)
SerialisationException(const std::string &iWhat)
SQLDatabaseException(const std::string &iWhat)
NonInitialisedServiceException(const std::string &iWhat)
SimpleNestingStructException(const std::string &iWhat)