mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
feat: Improve ChangeState
API
* Add `[[nodiscard]]` to `bool Device::ChangeState()` * Introduce throwing variant `void Device::ChangeStateOrThrow()` resolves #441
This commit is contained in:
committed by
Dennis Klein
parent
5ef17fddbb
commit
435d07eaf9
@@ -152,7 +152,7 @@ auto DeviceRunner::Run() -> int
|
||||
fDevice->RegisterChannelEndpoints();
|
||||
if (fConfig.Count("print-channels")) {
|
||||
fDevice->PrintRegisteredChannels();
|
||||
fDevice->ChangeState(fair::mq::Transition::End);
|
||||
fDevice->ChangeStateOrThrow(fair::mq::Transition::End);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ auto DeviceRunner::Run() -> int
|
||||
if (fConfig.Count("version")) {
|
||||
LOGV(info, verylow) << "FairMQ version: " << FAIRMQ_GIT_VERSION;
|
||||
LOGV(info, verylow) << "User device version: " << fDevice->GetVersion();
|
||||
fDevice->ChangeState(fair::mq::Transition::End);
|
||||
fDevice->ChangeStateOrThrow(fair::mq::Transition::End);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user