mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Handle errors in static and interactive controllers
This commit is contained in:
committed by
Dennis Klein
parent
45354f268b
commit
bde12f58b2
@@ -209,6 +209,11 @@ try
|
||||
}
|
||||
}
|
||||
|
||||
if (GetCurrentDeviceState() == DeviceState::Error)
|
||||
{
|
||||
throw DeviceErrorState("Controlled device transitioned to error state.");
|
||||
}
|
||||
|
||||
if (fDeviceShutdownRequested)
|
||||
{
|
||||
break;
|
||||
@@ -273,6 +278,11 @@ try
|
||||
{
|
||||
fNewEvent.wait_for(lock, chrono::milliseconds(50));
|
||||
}
|
||||
|
||||
if (fEvents.front() == DeviceState::Error)
|
||||
{
|
||||
throw DeviceErrorState("Controlled device transitioned to error state.");
|
||||
}
|
||||
}
|
||||
|
||||
RunShutdownSequence();
|
||||
|
Reference in New Issue
Block a user