| 15 | |
| 16 | namespace Lemon{ |
| 17 | class InterfaceException : public std::exception{ |
| 18 | public: |
| 19 | enum { |
| 20 | InterfaceUnknownError, |
| 21 | InterfaceCreateExists, |
| 22 | InterfaceCreateInvalidService, |
| 23 | InterfaceCreateOther, |
| 24 | }; |
| 25 | protected: |
| 26 | int error = 0; |
| 27 | static const char* const errorStrings[]; |
| 28 | public: |
| 29 | InterfaceException(int error){ |
| 30 | this->error = error; |
| 31 | } |
| 32 | |
| 33 | const char* what() const noexcept{ |
| 34 | return errorStrings[error]; |
| 35 | } |
| 36 | }; |
| 37 | |
| 38 | class Interface : public Waitable{ |
| 39 | private: |