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 virtual const char* what() const noexcept override 13 { 14 return message.c_str(); 15 } 16 17 private: 18 std::string message; 19 }; 20 21 class ControllerBuildException : public std::exception 22 { 23 public: 24 explicit ControllerBuildException(const std::string& message) : 25 message(message) 26 {} 27 28 virtual const char* what() const noexcept override 29 { 30 return message.c_str(); 31 } 32 33 private: 34 std::string message; 35 }; 36 37 class ConfigurationException : public std::exception 38 { 39 public: 40 explicit ConfigurationException(const std::string& message) : 41 message(message) 42 {} 43 44 virtual const char* what() const noexcept override 45 { 46 return message.c_str(); 47 } 48 49 private: 50 std::string message; 51 }; 52