Do not catch and rethrow exception from state handlers

This commit is contained in:
Alexey Rybalchenko
2021-11-03 12:03:09 +01:00
parent ebcbe2dde6
commit a071b40e79
5 changed files with 98 additions and 49 deletions

View File

@@ -320,10 +320,7 @@ class Device
try {
return fChannels.at(channelName).at(index);
} catch (const std::out_of_range& oor) {
LOG(error)
<< "requested channel has not been configured? check channel names/configuration.";
LOG(error) << "channel: " << channelName << ", index: " << index;
LOG(error) << "out of range: " << oor.what();
LOG(error) << "GetChannel(): '" << channelName << "[" << index << "]' does not exist.";
throw;
}