Krzysztof Grobelny | 62c08e9 | 2022-09-16 10:28:53 +0200 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/exception.hpp> |
| 4 | |
| 5 | #include <string> |
| 6 | #include <string_view> |
| 7 | |
| 8 | namespace errors |
| 9 | { |
| 10 | |
| 11 | class InvalidArgument final : public sdbusplus::exception::internal_exception |
| 12 | { |
| 13 | public: |
| 14 | explicit InvalidArgument(std::string_view propertyName); |
| 15 | InvalidArgument(std::string_view propertyName, std::string_view info); |
| 16 | |
| 17 | const char* name() const noexcept override; |
| 18 | const char* description() const noexcept override; |
| 19 | const char* what() const noexcept override; |
| 20 | int get_errno() const noexcept override; |
| 21 | |
| 22 | std::string propertyName; |
| 23 | |
| 24 | private: |
| 25 | std::string errWhatDetailed; |
| 26 | }; |
| 27 | |
| 28 | } // namespace errors |