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: |
| 9 | SensorBuildException(const std::string& message) : message(message) |
| 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: |
| 25 | ControllerBuildException(const std::string& message) : message(message) |
| 26 | { |
| 27 | } |
| 28 | |
| 29 | virtual const char* what() const noexcept override |
| 30 | { |
| 31 | return message.c_str(); |
| 32 | } |
| 33 | |
| 34 | private: |
| 35 | std::string message; |
| 36 | }; |
Patrick Venture | 81cef91 | 2019-02-11 11:57:25 -0800 | [diff] [blame] | 37 | |
| 38 | class ConfigurationException : public std::exception |
| 39 | { |
| 40 | public: |
| 41 | ConfigurationException(const std::string& message) : message(message) |
| 42 | { |
| 43 | } |
| 44 | |
| 45 | virtual const char* what() const noexcept override |
| 46 | { |
| 47 | return message.c_str(); |
| 48 | } |
| 49 | |
| 50 | private: |
| 51 | std::string message; |
| 52 | }; |