| author | nireco |
| Mon, 24 Nov 2008 22:18:49 +0000 | |
| changeset 106 | 731f9dd775d4 |
| parent 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 */ |