2004-08-29 00:26:52 +04:00
|
|
|
// gensyscalls_common.h
|
|
|
|
|
|
|
|
#ifndef _GEN_SYSCALLS_COMMON_H
|
|
|
|
#define _GEN_SYSCALLS_COMMON_H
|
|
|
|
|
2004-09-11 03:14:59 +04:00
|
|
|
#include <exception>
|
2004-08-29 00:26:52 +04:00
|
|
|
#include <string>
|
|
|
|
|
2004-09-10 22:29:52 +04:00
|
|
|
using namespace std;
|
|
|
|
|
2004-08-29 00:26:52 +04:00
|
|
|
// Exception
|
|
|
|
struct Exception : exception {
|
|
|
|
Exception()
|
|
|
|
: fMessage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Exception(const string &message)
|
|
|
|
: fMessage(message)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-09-10 22:29:52 +04:00
|
|
|
virtual ~Exception() throw() {}
|
2004-08-29 00:26:52 +04:00
|
|
|
|
2004-09-10 22:29:52 +04:00
|
|
|
virtual const char *what() const throw()
|
2004-08-29 00:26:52 +04:00
|
|
|
{
|
|
|
|
return fMessage.c_str();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
string fMessage;
|
|
|
|
};
|
|
|
|
|
|
|
|
// EOFException
|
|
|
|
struct EOFException : public Exception {
|
|
|
|
EOFException() {}
|
|
|
|
EOFException(const string &message) : Exception(message) {}
|
2004-09-10 22:29:52 +04:00
|
|
|
virtual ~EOFException() throw() {}
|
2004-08-29 00:26:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// IOException
|
|
|
|
struct IOException : public Exception {
|
|
|
|
IOException() {}
|
|
|
|
IOException(const string &message) : Exception(message) {}
|
2004-09-10 22:29:52 +04:00
|
|
|
virtual ~IOException() throw() {}
|
2004-08-29 00:26:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ParseException
|
|
|
|
struct ParseException : public Exception {
|
|
|
|
ParseException() {}
|
|
|
|
ParseException(const string &message) : Exception(message) {}
|
2004-09-10 22:29:52 +04:00
|
|
|
virtual ~ParseException() throw() {}
|
2004-08-29 00:26:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _GEN_SYSCALLS_COMMON_H
|