Skip to content
Snippets Groups Projects
Commit b33a6a53 authored by Christian Dreher's avatar Christian Dreher
Browse files

fix: Improve error handling

parent 201ba025
No related branches found
No related tags found
1 merge request!99Fix rogue emergency stop button
Pipeline #19708 failed
......@@ -110,21 +110,20 @@ namespace armarx
ARMARX_INFO << "SS2 widget connected.";
emergencyStopMasterPrx = getProxy<EmergencyStopMasterInterfacePrx>(EMERGENCY_STOP_PROXY);
QMetaObject::invokeMethod(button, "setVisible", Qt::QueuedConnection, Q_ARG(bool, true));
EmergencyStopState state = EmergencyStopState::eEmergencyStopActive;
try
{
QMetaObject::invokeMethod(
this,
"setChecked",
Qt::QueuedConnection,
Q_ARG(EmergencyStopState, emergencyStopMasterPrx->getEmergencyStopState()));
state = emergencyStopMasterPrx->getEmergencyStopState();
}
catch (Ice::Exception const& e)
{
ARMARX_ERROR << "Could not query SS2 state." << deactivateSpam(2);
setChecked(EmergencyStopState::eEmergencyStopActive);
}
QMetaObject::invokeMethod(
this, "setChecked", Qt::QueuedConnection, Q_ARG(EmergencyStopState, state));
emit startPeriodicStateUpdate();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment