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