]>
Commit | Line | Data |
---|---|---|
ce4e8c42 | 1 | #ifndef __GS__DATALAYEREXCEPTIONS_H__\r |
2 | #define __GS__DATALAYEREXCEPTIONS_H__\r | |
3 | \r | |
4 | #include <GameServ/GameServException.h>\r | |
5 | using GameServ::Exceptions::GameServException;\r | |
6 | \r | |
7 | namespace GameServ { namespace DataLayer \r | |
8 | {\r | |
9 | //! Generic and defined exceptions thrown concerning Game Layer errors\r | |
10 | /*!\r | |
11 | All Game Layer exceptions derive from GameLayerException to \r | |
12 | provide more concrete error descriptions that allow the client to \r | |
13 | pinpoint situations that may occur.\r | |
14 | */\r | |
15 | namespace Exceptions\r | |
16 | {\r | |
17 | //! Generic base data layer exception\r | |
18 | /*!\r | |
19 | Derive all data layer specific exceptions from this base class\r | |
20 | to clasify them as a data layer exception.\r | |
21 | */\r | |
22 | class DataLayerException : public GameServException\r | |
23 | {\r | |
24 | public:\r | |
25 | DataLayerException(const string &ErrorMsg, const char *pFilename, int LineNumber);\r | |
26 | DataLayerException(const string &ErrorMsg);\r | |
27 | DataLayerException(void);\r | |
28 | };\r | |
29 | \r | |
30 | //! Occurs when there is a problem accessing a data resource\r | |
31 | /*!\r | |
32 | More concrete instantiations may actually exist when this occurs, like\r | |
33 | if a particular SQL problem occurs, or an Edx file IO problem happens, but\r | |
34 | this allows us to deal with those in a more generic way, whilest the \r | |
35 | message stays somewhat more specific.\r | |
36 | */\r | |
37 | class ResourceException : public DataLayerException\r | |
38 | {\r | |
39 | public:\r | |
40 | ResourceException(const string &ErrorMsg, const char *pFilename, int LineNumber);\r | |
41 | ResourceException(const string &ErrorMsg);\r | |
42 | ResourceException(void);\r | |
43 | };\r | |
44 | } // Exceptions\r | |
45 | } } // GameServ.DataLayer\r | |
46 | \r | |
47 | #endif // __GS__DATALAYEREXCEPTIONS_H__\r |