1 #pragma once 2 3 #include <exception> 4 #include <string> 5 6 class SensorBuildException : public std::exception 7 { 8 public: 9 explicit 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 }; 21 22 class ControllerBuildException : public std::exception 23 { 24 public: 25 explicit ControllerBuildException(const std::string& message) : 26 message(message) 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 }; 38 39 class ConfigurationException : public std::exception 40 { 41 public: 42 explicit ConfigurationException(const std::string& message) : 43 message(message) 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 }; 55