2004-07-15 21:10:33 +02:00
|
|
|
#ifndef _ERRORS_H_
|
|
|
|
#define _ERRORS_H_
|
|
|
|
|
|
|
|
#include <stdlib.h> // for wchar_t
|
|
|
|
|
|
|
|
class PSERROR
|
|
|
|
{
|
|
|
|
public:
|
2004-07-17 19:09:33 +02:00
|
|
|
int magic; // = 0x45725221, so the exception handler can recognise
|
|
|
|
// that it's a PSERROR and not some other random object.
|
|
|
|
int code; // unique (but arbitrary) code, for translation tables etc
|
2004-07-15 21:10:33 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#define ERROR_GROUP(a,b) class a##_##b : public a {}
|
|
|
|
#define ERROR_TYPE(a,b) class a##_##b : public a { public: a##_##b(); }
|
|
|
|
|
|
|
|
const wchar_t* GetErrorString(int code);
|
|
|
|
|
2004-07-15 21:59:27 +02:00
|
|
|
#endif
|