From f35a8a90daee1e4ab02f2d20462aa0d85c9147ad Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 19 Sep 2023 19:29:12 +0200 Subject: [PATCH] DetectorWrapper: Ignore exceptions of Detector:stopDetector() (cherry picked from commit 2e63e50858de90163f4cc9cbf5ebc611a4878cb6) --- detector_control/DetectorWrapper.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/detector_control/DetectorWrapper.cpp b/detector_control/DetectorWrapper.cpp index 0adfcd4b..82d3766e 100644 --- a/detector_control/DetectorWrapper.cpp +++ b/detector_control/DetectorWrapper.cpp @@ -134,7 +134,10 @@ void DetectorWrapper::InternalStop() { throw JFJochException(JFJochExceptionCategory::Detector, "Detector in error state"); else if (state == DetectorState::BUSY) { - det.stopDetector(); + try { + // Sometimes stop gives problem - ignore these + det.stopDetector(); + } catch (...) {} std::this_thread::sleep_for(std::chrono::milliseconds(10)); state = GetState(); if (state != DetectorState::IDLE)