Patrick Venture | 36bffb4 | 2019-06-24 10:47:47 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <exception> |
| 4 | #include <string> |
| 5 | |
| 6 | namespace ipmi_flash |
| 7 | { |
| 8 | |
| 9 | class MapperException : public std::exception |
| 10 | { |
| 11 | public: |
Patrick Williams | 1038836 | 2023-05-10 07:51:09 -0500 | [diff] [blame^] | 12 | explicit MapperException(const std::string& message) : message(message) {} |
Patrick Venture | 36bffb4 | 2019-06-24 10:47:47 -0700 | [diff] [blame] | 13 | |
| 14 | virtual const char* what() const noexcept override |
| 15 | { |
| 16 | return message.c_str(); |
| 17 | } |
| 18 | |
| 19 | private: |
| 20 | std::string message; |
| 21 | }; |
| 22 | |
| 23 | } // namespace ipmi_flash |