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: |
| 12 | explicit MapperException(const std::string& message) : message(message) |
Patrick Venture | 9b37b09 | 2020-05-28 20:58:57 -0700 | [diff] [blame] | 13 | {} |
Patrick Venture | 36bffb4 | 2019-06-24 10:47:47 -0700 | [diff] [blame] | 14 | |
| 15 | virtual const char* what() const noexcept override |
| 16 | { |
| 17 | return message.c_str(); |
| 18 | } |
| 19 | |
| 20 | private: |
| 21 | std::string message; |
| 22 | }; |
| 23 | |
| 24 | } // namespace ipmi_flash |