Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #if !defined(ALIZE_Exception_h)
00056 #define ALIZE_Exception_h
00057
00058 #if defined(_WIN32)
00059 #if defined(ALIZE_EXPORTS)
00060 #define ALIZE_API __declspec(dllexport)
00061 #else
00062 #define ALIZE_API __declspec(dllimport)
00063 #endif
00064 #else
00065 #define ALIZE_API
00066 #endif
00067
00068 #include "Object.h"
00069 #include "alizeString.h"
00070
00071 namespace alize
00072 {
00073
00079
00080
00081 class ALIZE_API Exception : public Object
00082 {
00083 public :
00091 explicit Exception(const String& msg,
00092 const String& sourceFile, int line);
00093 explicit Exception(const String& msg,
00094 const String& sourceFile, int line, const String callerName);
00095 Exception(const Exception&);
00096 virtual ~Exception();
00097 virtual String toString() const;
00098 virtual String getClassName() const;
00099
00100
00117 String stackTrace( const String callerName) const ;
00118
00119 const String msg;
00120 const String sourceFile;
00121 const int line;
00122 String trace ;
00123 private:
00124 bool operator==(const Exception&) const;
00125 bool operator!=(const Exception& e) const;
00126 const Exception& operator=(const Exception&);
00127 };
00128
00129
00136
00137 class IndexOutOfBoundsException : public Exception
00138 {
00139 public :
00140 explicit IndexOutOfBoundsException(const String& msg,
00141 const String& sourceFile, int line,
00142 long index, long limit);
00143 IndexOutOfBoundsException(
00144 const IndexOutOfBoundsException&);
00145 virtual ~IndexOutOfBoundsException();
00146 virtual String getClassName() const;
00147 virtual String toString() const;
00148 const long index;
00149 const long limit;
00150 private:
00151 bool operator==(const IndexOutOfBoundsException&)
00152 const;
00153 bool operator!=(const IndexOutOfBoundsException& e)
00154 const;
00155 const IndexOutOfBoundsException& operator=(
00156 const IndexOutOfBoundsException&);
00157 };
00158
00159
00167
00168 class ALIZE_API IOException : public Exception
00169 {
00170 public :
00171 explicit IOException(const String& msg,
00172 const String& sourceFile, int line, const FileName& f);
00173 explicit IOException(const String& msg,
00174 const String& sourceFile, int line, const FileName& f, const String callerName);
00175 IOException(const IOException&);
00176 virtual ~IOException();
00177 virtual String toString() const;
00178 virtual String getClassName() const;
00179 const FileName fileName;
00180 private:
00181 bool operator==(const IOException&) const;
00182 bool operator!=(const IOException& e) const;
00183 const IOException& operator=(
00184 const IOException&);
00185 };
00186
00193
00194 class IdAlreadyExistsException : public Exception
00195 {
00196 public :
00197 explicit IdAlreadyExistsException(const String& msg,
00198 const String& sourceFile, int line);
00199 IdAlreadyExistsException(
00200 const IdAlreadyExistsException&);
00201 virtual ~IdAlreadyExistsException();
00202 virtual String getClassName() const;
00203 private:
00204 bool operator==(const IdAlreadyExistsException&)
00205 const;
00206 bool operator!=(const IdAlreadyExistsException& e)
00207 const;
00208 const IdAlreadyExistsException& operator=(const
00209 IdAlreadyExistsException&);
00210 };
00211
00218
00219 class InvalidDataException : public IOException
00220 {
00221 public :
00222 explicit InvalidDataException(const String& msg,
00223 const String& sourceFile, int line, const FileName& f);
00224 InvalidDataException(const InvalidDataException&);
00225 virtual ~InvalidDataException();
00226 virtual String getClassName() const;
00227 private:
00228 bool operator==(const InvalidDataException&)
00229 const;
00230 bool operator!=(const InvalidDataException& e)
00231 const;
00232 const InvalidDataException& operator=(const
00233 InvalidDataException&);
00234 };
00235
00240
00241 class FileNotFoundException : public IOException
00242 {
00243 public :
00244 explicit FileNotFoundException(const String& msg,
00245 const String& sourceFile, int line, const FileName& f);
00246 FileNotFoundException(const FileNotFoundException&);
00247 virtual ~FileNotFoundException();
00248 virtual String getClassName() const;
00249 private:
00250 bool operator==(const FileNotFoundException&)
00251 const;
00252 bool operator!=(const FileNotFoundException& e)
00253 const;
00254 const FileNotFoundException& operator=(const
00255 FileNotFoundException&);
00256 };
00257
00263
00264 class EOFException : public IOException
00265 {
00266 public :
00267 explicit EOFException(const String& msg,
00268 const String& sourceFile, int line, const FileName& f);
00269 EOFException(const EOFException&);
00270 virtual ~EOFException();
00271 virtual String getClassName() const;
00272 private:
00273 bool operator==(const EOFException&) const;
00274 bool operator!=(const EOFException& e)
00275 const;
00276 const EOFException& operator=(
00277 const EOFException&);
00278 };
00279
00284
00285 class OutOfMemoryException : public Exception
00286 {
00287 public :
00288 explicit OutOfMemoryException(const String& msg,
00289 const String& sourceFile, int line);
00290 OutOfMemoryException(const OutOfMemoryException&);
00291 virtual ~OutOfMemoryException();
00292 virtual String getClassName() const;
00293 private:
00294 bool operator==(const OutOfMemoryException&)
00295 const;
00296 bool operator!=(const OutOfMemoryException& e)
00297 const;
00298 const OutOfMemoryException& operator=(const
00299 OutOfMemoryException&);
00300 };
00301
00306
00307 class ParamNotFoundInConfigException : public Exception
00308 {
00309 public :
00310 explicit ParamNotFoundInConfigException(const String& msg,
00311 const String& sourceFile, int line);
00312 ParamNotFoundInConfigException(const ParamNotFoundInConfigException&);
00313 virtual ~ParamNotFoundInConfigException();
00314 virtual String getClassName() const;
00315 private:
00316 bool operator==(const ParamNotFoundInConfigException&)
00317 const;
00318 bool operator!=(const ParamNotFoundInConfigException& e)
00319 const;
00320 const ParamNotFoundInConfigException& operator=(const
00321 ParamNotFoundInConfigException&);
00322 };
00323
00328
00329 class ConfigCheckException : public Exception
00330 {
00331 public :
00332 explicit ConfigCheckException(const String& msg,
00333 const String& sourceFile, int line);
00334 ConfigCheckException(const ConfigCheckException&);
00335 virtual ~ConfigCheckException();
00336 virtual String getClassName() const;
00337 private:
00338 bool operator==(const ConfigCheckException&)
00339 const;
00340 bool operator!=(const ConfigCheckException& e)
00341 const;
00342 const ConfigCheckException& operator=(const
00343 ConfigCheckException&);
00344 };
00345
00346 }
00347
00348
00349
00350 #endif // !defined(ALIZE_Exception_h)
00351