From 405806518c2e92993baecb3f63b1d824e1df9b67 Mon Sep 17 00:00:00 2001 From: appleb_m Date: Wed, 22 Apr 2026 16:06:41 +0200 Subject: [PATCH] DAQ: trying to tidy up aaredb error communication in raster scans --- src/aare/daq/daq.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/aare/daq/daq.py b/src/aare/daq/daq.py index 581eef56..eefd5b63 100644 --- a/src/aare/daq/daq.py +++ b/src/aare/daq/daq.py @@ -1038,10 +1038,24 @@ class AareDAQ: # Let JFJochCommunicationError propagate result = self.__jfjoch.wait_till_done(60) - except JFJochCommunicationError: + except JFJochCommunicationError as e: + self._handle_operation_error( + operation=DAQOperation.ROTATION, + sample=self.sample, + error=e, + event_type=SampleEventType.COLLECTIONFAILED, + additional_comment="JFJoch Communication Error", + ) raise except Exception as e: logger.error(f"Exception during rotation scan: {e}") + self._handle_operation_error( + operation=DAQOperation.ROTATION, + sample=self.sample, + error=e, + event_type=SampleEventType.COLLECTIONFAILED, + additional_comment=None, + ) raise return result