diff options
Diffstat (limited to 'sensorhandler.hpp')
-rw-r--r-- | sensorhandler.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sensorhandler.hpp b/sensorhandler.hpp index 56a7021..f5a8b41 100644 --- a/sensorhandler.hpp +++ b/sensorhandler.hpp @@ -2,6 +2,7 @@ #include <stdint.h> +#include <exception> #include <ipmid/api.hpp> #include <ipmid/types.hpp> @@ -38,6 +39,16 @@ enum ipmi_sensor_types IPMI_SENSOR_TPM = 0xCC, }; +/** @brief Custom exception for reading sensors that are not funcitonal. + */ +struct SensorFunctionalError : public std::exception +{ + const char* what() const noexcept + { + return "Sensor not functional"; + } +}; + #define MAX_DBUS_PATH 128 struct dbus_interface_t { |