absence_thelab
diff src/3deng/exceptions.h @ 0:1cffe3409164
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 23 Oct 2014 01:46:07 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/3deng/exceptions.h Thu Oct 23 01:46:07 2014 +0300 1.3 @@ -0,0 +1,41 @@ 1.4 +#ifndef _EXCEPTIONS_H_ 1.5 +#define _EXCEPTIONS_H_ 1.6 + 1.7 +#include <string> 1.8 + 1.9 +using std::string; 1.10 + 1.11 +class EngineBaseException { 1.12 +protected: 1.13 + string str; 1.14 + 1.15 +public: 1.16 + 1.17 + virtual string GetReason() const = 0; 1.18 +}; 1.19 + 1.20 +class EngineInitException : protected EngineBaseException { 1.21 +public: 1.22 + EngineInitException(); 1.23 + EngineInitException(string reason); 1.24 + 1.25 + virtual string GetReason() const; 1.26 +}; 1.27 + 1.28 +class EngineModuleNotFoundException : protected EngineBaseException { 1.29 +public: 1.30 + EngineModuleNotFoundException(); 1.31 + EngineModuleNotFoundException(string modulename); 1.32 + 1.33 + virtual string GetReason() const; 1.34 +}; 1.35 + 1.36 +class EngineGeneralException : protected EngineBaseException { 1.37 +public: 1.38 + EngineGeneralException(); 1.39 + EngineGeneralException(string reason); 1.40 + 1.41 + virtual string GetReason() const; 1.42 +}; 1.43 + 1.44 +#endif // _EXCEPTIONS_H_ 1.45 \ No newline at end of file