diff options
Diffstat (limited to 'monitor/fan.cpp')
-rw-r--r-- | monitor/fan.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/monitor/fan.cpp b/monitor/fan.cpp index f3937c2..6d88d2a 100644 --- a/monitor/fan.cpp +++ b/monitor/fan.cpp @@ -49,13 +49,21 @@ Fan::Fan(sdbusplus::bus::bus& bus, for (auto& s : sensors) { - _sensors.emplace_back( - std::make_unique<TachSensor>(bus, - *this, - std::get<sensorNameField>(s), - std::get<hasTargetField>(s), - std::get<timeoutField>(def), - events)); + try + { + _sensors.emplace_back( + std::make_unique<TachSensor>( + bus, + *this, + std::get<sensorNameField>(s), + std::get<hasTargetField>(s), + std::get<timeoutField>(def), + events)); + } + catch (InvalidSensorError& e) + { + + } } //Start from a known state of functional |