branch | no-netsession |
changeset 36 | 785d220fc6b7 |
child 38 | 4189b8bf3a5b |
35:e21cfda0edde | 36:785d220fc6b7 |
---|---|
1 #ifndef ERROR_HH |
|
2 #define ERROR_HH |
|
3 |
|
4 class Error : public std::exception { |
|
5 private: |
|
6 const char *message; |
|
7 |
|
8 public: |
|
9 Error (const std::string &message) : message(message.c_str()) { } |
|
10 |
|
11 virtual const char* what() const throw() { |
|
12 return message; |
|
13 } |
|
14 }; |
|
15 |
|
16 #endif /* ERROR_HH */ |