author | terom |
Thu, 20 Nov 2008 23:51:46 +0000 | |
changeset 89 | 825c4613e087 |
permissions | -rw-r--r-- |
89 | 1 |
#ifndef ERROR_HH |
2 |
#define ERROR_HH |
|
3 |
||
4 |
#include <stdexcept> |
|
5 |
#include <string> |
|
6 |
||
7 |
class Error : public std::exception { |
|
8 |
private: |
|
9 |
const char *message; |
|
10 |
||
11 |
public: |
|
12 |
Error (const std::string &message) : message(message.c_str()) { } |
|
13 |
||
14 |
virtual const char* what() const throw() { |
|
15 |
return message; |
|
16 |
} |
|
17 |
}; |
|
18 |
||
19 |
#endif /* ERROR_HH */ |