Home | nevrax.com |
|
ai_exception.hGo to the documentation of this file.00001 00017 /* Copyright, 2000 Nevrax Ltd. 00018 * 00019 * This file is part of NEVRAX NEL. 00020 * NEVRAX NEL is free software; you can redistribute it and/or modify 00021 * it under the terms of the GNU General Public License as published by 00022 * the Free Software Foundation; either version 2, or (at your option) 00023 * any later version. 00024 00025 * NEVRAX NEL is distributed in the hope that it will be useful, but 00026 * WITHOUT ANY WARRANTY; without even the implied warranty of 00027 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00028 * General Public License for more details. 00029 00030 * You should have received a copy of the GNU General Public License 00031 * along with NEVRAX NEL; see the file COPYING. If not, write to the 00032 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 00033 * MA 02111-1307, USA. 00034 */ 00035 00036 #ifndef NL_IA_EXCEPTION_H 00037 #define NL_IA_EXCEPTION_H 00038 00039 #include "nel/misc/types_nl.h" 00040 #include "nel/misc/common.h" 00041 00042 //#include "nel/ai/e/nel_exception_def.h" 00043 00044 namespace NLAIE 00045 { 00046 class IException: public NLMISC::Exception 00047 { 00048 00049 private: 00050 public: 00051 IException() 00052 { 00053 } 00054 00055 IException(const IException &e):NLMISC::Exception(e.what()) 00056 { 00057 } 00058 IException(const std::string &reason): NLMISC::Exception(reason) 00059 { 00060 } 00061 virtual const IException *clone() const = 0; 00062 virtual ~IException() throw() 00063 { 00064 } 00065 }; 00066 00067 class CExceptionContainer: public IException 00068 { 00069 00070 public: 00071 CExceptionContainer(const CExceptionContainer &exc); 00072 CExceptionContainer(const std::string &name); 00073 00074 virtual const IException *clone() const; 00075 virtual ~CExceptionContainer() throw() 00076 { 00077 } 00078 }; 00079 00080 class CExceptionIndexError: public IException 00081 { 00082 public: 00083 00084 CExceptionIndexError(): IException("Depacement de résolution sur les index") 00085 { 00086 } 00087 00088 virtual const IException *clone() const; 00089 00090 virtual ~CExceptionIndexError() throw() 00091 { 00092 } 00093 }; 00094 00095 class CExceptionIndexHandeledError: public IException 00096 { 00097 00098 public: 00099 00100 CExceptionIndexHandeledError(): IException("l'index ne pointe pas rien un agent") 00101 { 00102 } 00103 00104 virtual const IException *clone() const; 00105 00106 virtual ~CExceptionIndexHandeledError() throw() 00107 { 00108 } 00109 }; 00110 00111 class CExceptionUnRegisterClassError: public IException 00112 { 00113 private: 00114 public: 00115 CExceptionUnRegisterClassError(const CExceptionUnRegisterClassError &e); 00116 CExceptionUnRegisterClassError(const std::string &name); 00117 00118 virtual const IException *clone() const; 00119 00120 ~CExceptionUnRegisterClassError() throw() 00121 { 00122 } 00123 00124 }; 00125 00126 class CExceptionObjectNotFoundError: public IException 00127 { 00128 public: 00129 CExceptionObjectNotFoundError(const CExceptionObjectNotFoundError &e):IException(e) 00130 { 00131 } 00132 CExceptionObjectNotFoundError(const std::string &name):IException(name) 00133 { 00134 } 00135 00136 virtual const IException *clone() const; 00137 00138 ~CExceptionObjectNotFoundError() throw() 00139 { 00140 } 00141 }; 00142 00143 class CExceptionNotImplemented: public IException 00144 { 00145 public: 00146 00147 CExceptionNotImplemented(const CExceptionNotImplemented &e); 00148 00149 CExceptionNotImplemented(const std::string &text); 00150 00151 virtual const IException *clone() const; 00152 00153 virtual ~CExceptionNotImplemented() throw() 00154 { 00155 } 00156 }; 00157 00158 class CExceptionUnReference: public IException 00159 { 00160 public: 00161 00162 CExceptionUnReference(const CExceptionUnReference &e); 00163 CExceptionUnReference(const std::string &text); 00164 CExceptionUnReference(char *text); 00165 00166 virtual const IException *clone() const; 00167 00168 virtual ~CExceptionUnReference() throw() 00169 { 00170 } 00171 }; 00172 00173 class CExceptionAllReadyExist: public IException 00174 { 00175 00176 public: 00177 00178 CExceptionAllReadyExist(const CExceptionAllReadyExist &e):IException(e) 00179 { 00180 } 00181 00182 CExceptionAllReadyExist(const std::string &name):IException(name) 00183 { 00184 } 00185 00186 virtual const IException *clone() const; 00187 00188 virtual ~CExceptionAllReadyExist() throw() 00189 { 00190 } 00191 }; 00192 } 00193 #endif |