1
1
forked from 0ad/0ad
0ad/source/ps/Errors.h
Ykkrosh 1e40ed1543 More attempted error handling
This was SVN commit r769.
2004-07-17 17:09:33 +00:00

20 lines
477 B
C++
Executable File

#ifndef _ERRORS_H_
#define _ERRORS_H_
#include <stdlib.h> // for wchar_t
class PSERROR
{
public:
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
};
#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);
#endif