18#ifndef INCLUDED_ERRORS
19#define INCLUDED_ERRORS
81 virtual const char*
what()
const throw ();
87#define ERROR_GROUP(a) class PSERROR_##a : public PSERROR { protected: PSERROR_##a(const char* msg); }; \
88 extern const PSRETURN MASK__PSRETURN_##a; \
89 extern const PSRETURN CODE__PSRETURN_##a
91#define ERROR_SUBGROUP(a,b) class PSERROR_##a##_##b : public PSERROR_##a { protected: PSERROR_##a##_##b(const char* msg); }; \
92 extern const PSRETURN MASK__PSRETURN_##a##_##b; \
93 extern const PSRETURN CODE__PSRETURN_##a##_##b
96#define ERROR_TYPE(a,b) class PSERROR_##a##_##b : public PSERROR_##a { public: PSERROR_##a##_##b(); PSERROR_##a##_##b(const char* msg); PSRETURN getCode() const; }; \
97 extern const PSRETURN MASK__PSRETURN_##a##_##b; \
98 extern const PSRETURN CODE__PSRETURN_##a##_##b; \
99 extern const PSRETURN PSRETURN_##a##_##b
101#define ERROR_IS(a, b) ( ((a) & MASK__PSRETURN_##b) == CODE__PSRETURN_##b )
const PSRETURN CODE__PSRETURN_OK
Definition: Errors.h:105
void ThrowError(PSRETURN code)
Definition: Errors.cpp:407
u32 PSRETURN
Definition: Errors.h:75
const char * GetErrorString(PSRETURN code)
Definition: Errors.cpp:362
const PSRETURN PSRETURN_OK
Definition: Errors.h:103
const PSRETURN MASK__PSRETURN_OK
Definition: Errors.h:104
PSERROR(const char *msg)
Definition: Errors.cpp:355
const char * m_msg
Definition: Errors.h:84
virtual const char * what() const
Definition: Errors.cpp:357
virtual PSRETURN getCode() const =0
uint32_t u32
Definition: types.h:39