additional try catch block
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-05-02 22:58:06 +02:00
parent 1f8a68dabe
commit 0172351e89
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -37,11 +37,16 @@ HeaterHandler::HeaterHandler(object_id_t setObjectId_, GpioIF* gpioInterface_, H
HeaterHandler::~HeaterHandler() {} HeaterHandler::~HeaterHandler() {}
ReturnValue_t HeaterHandler::performOperation(uint8_t operationCode) { ReturnValue_t HeaterHandler::performOperation(uint8_t operationCode) {
try {
readCommandQueue(); readCommandQueue();
handleActiveCommands(); handleActiveCommands();
for (const auto& heater : helper.heaters) { for (const auto& heater : helper.heaters) {
heater.first->performOperation(0); 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; return RETURN_OK;
} }