From c21cc57f35ae9f57b4e77945a44923a4730cc6cf Mon Sep 17 00:00:00 2001 From: appel_c Date: Tue, 26 May 2026 13:24:35 +0200 Subject: [PATCH] refactor(timepix): add explicit RuntimeError for failed file writer of the backend. --- superxas_bec/devices/timepix/timepix.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/superxas_bec/devices/timepix/timepix.py b/superxas_bec/devices/timepix/timepix.py index 0095535..2f59780 100644 --- a/superxas_bec/devices/timepix/timepix.py +++ b/superxas_bec/devices/timepix/timepix.py @@ -776,7 +776,14 @@ class Timepix(PSIDeviceBase, TimePixControl): status_writer = None if self.hdf.enable.get() == "Enable": st2 = CompareStatus(self.hdf.write_file, ACQUIRESTATUS.DONE) - st3 = ExceptionStatus(self.hdf.write_status, 0, operation="!=") + st3 = ExceptionStatus( + self.hdf.write_status, + 0, + operation="!=", + exception=RuntimeError( + "HDF5 write failed, please check with support if the IOC has sufficient permissions to write to disk." + ), + ) status_written_images = CompareStatus(self.hdf.num_captured, self._n_images) status_writer = st1 & st2 & status_written_images & st3