]>
jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/include/GameServ/DataLayer/DataLayerExceptions.h
1 #ifndef __GS__DATALAYEREXCEPTIONS_H__
2 #define __GS__DATALAYEREXCEPTIONS_H__
4 #include <GameServ/GameServException.h>
5 using GameServ::Exceptions::GameServException
;
7 namespace GameServ
{ namespace DataLayer
9 //! Generic and defined exceptions thrown concerning Game Layer errors
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.
17 //! Generic base data layer exception
19 Derive all data layer specific exceptions from this base class
20 to clasify them as a data layer exception.
22 class DataLayerException
: public GameServException
25 DataLayerException(const string
&ErrorMsg
, const char *pFilename
, int LineNumber
);
26 DataLayerException(const string
&ErrorMsg
);
27 DataLayerException(void);
30 //! Occurs when there is a problem accessing a data resource
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.
37 class ResourceException
: public DataLayerException
40 ResourceException(const string
&ErrorMsg
, const char *pFilename
, int LineNumber
);
41 ResourceException(const string
&ErrorMsg
);
42 ResourceException(void);
45 } } // GameServ.DataLayer
47 #endif // __GS__DATALAYEREXCEPTIONS_H__