Patrick Venture | c404b3e | 2018-10-30 14:17:49 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <exception> |
| 4 | #include <string> |
| 5 | |
| 6 | class SensorBuildException : public std::exception |
| 7 | { |
| 8 | public: |
Patrick Venture | 83a2c3b | 2020-08-03 11:19:28 -0700 | [diff] [blame^] | 9 | explicit SensorBuildException(const std::string& message) : message(message) |
Patrick Venture | c404b3e | 2018-10-30 14:17:49 -0700 | [diff] [blame] | 10 | { |
| 11 | } |
| 12 | |
| 13 | virtual const char* what() const noexcept override |
| 14 | { |
| 15 | return message.c_str(); |
| 16 | } |
| 17 | |
| 18 | private: |
| 19 | std::string message; |
| 20 | }; |
James Feist | 734f953 | 2018-11-15 12:13:18 -0800 | [diff] [blame] | 21 | |
| 22 | class ControllerBuildException : public std::exception |
| 23 | { |
| 24 | public: |
Patrick Venture | 83a2c3b | 2020-08-03 11:19:28 -0700 | [diff] [blame^] | 25 | explicit ControllerBuildException(const std::string& message) : |
| 26 | message(message) |
James Feist | 734f953 | 2018-11-15 12:13:18 -0800 | [diff] [blame] | 27 | { |
| 28 | } |
| 29 | |
| 30 | virtual const char* what() const noexcept override |
| 31 | { |
| 32 | return message.c_str(); |
| 33 | } |
| 34 | |
| 35 | private: |
| 36 | std::string message; |
| 37 | }; |
Patrick Venture | 81cef91 | 2019-02-11 11:57:25 -0800 | [diff] [blame] | 38 | |
| 39 | class ConfigurationException : public std::exception |
| 40 | { |
| 41 | public: |
Patrick Venture | 83a2c3b | 2020-08-03 11:19:28 -0700 | [diff] [blame^] | 42 | explicit ConfigurationException(const std::string& message) : |
| 43 | message(message) |
Patrick Venture | 81cef91 | 2019-02-11 11:57:25 -0800 | [diff] [blame] | 44 | { |
| 45 | } |
| 46 | |
| 47 | virtual const char* what() const noexcept override |
| 48 | { |
| 49 | return message.c_str(); |
| 50 | } |
| 51 | |
| 52 | private: |
| 53 | std::string message; |
| 54 | }; |