diff --git a/mission/devices/HeaterHandler.cpp b/mission/devices/HeaterHandler.cpp index 3582edb0..5771e27b 100644 --- a/mission/devices/HeaterHandler.cpp +++ b/mission/devices/HeaterHandler.cpp @@ -37,10 +37,15 @@ HeaterHandler::HeaterHandler(object_id_t setObjectId_, GpioIF* gpioInterface_, H HeaterHandler::~HeaterHandler() {} ReturnValue_t HeaterHandler::performOperation(uint8_t operationCode) { - readCommandQueue(); - handleActiveCommands(); - for (const auto& heater : helper.heaters) { - heater.first->performOperation(0); + try { + readCommandQueue(); + handleActiveCommands(); + for (const auto& heater : helper.heaters) { + heater.first->performOperation(0); + } + } catch(const std::out_of_range& e) { + sif::warning << "HeaterHandler::performOperation: " + "Out of range error | " << e.what() << std::endl; } return RETURN_OK; }