]> git.sesse.net Git - freerainbowtables/blob - Server Applications/rsearchi/Exception.h
initial
[freerainbowtables] / Server Applications / rsearchi / Exception.h
1 #ifndef __EXCEPTION_H__
2 #define __EXCEPTION_H__
3 #include <string>
4
5
6 class Exception
7 {
8 protected:
9         std::string m_Message;
10
11 public:
12         Exception(std::string szErrorMessage);
13         const char* GetErrorMessage();
14 public:
15         ~Exception(void);
16 };
17
18 class DatabaseException : public Exception
19 {
20 protected:
21         unsigned int nErrorCode;        
22         
23 public:
24         DatabaseException(std::string szError, unsigned int nErrorNum) : Exception(szError) { nErrorCode = nErrorNum; };
25         unsigned int getErrorCode() { return nErrorCode; }
26 };
27
28 #endif
29