From 6db8fac613a1f27a4ef845a8ed66f7c4fc7a9d4b Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Thu, 2 Jul 2026 13:54:55 +0000 Subject: [PATCH] Apply suggestions from code review of branch stitching-cancel Co-authored-by: Richard Bowman --- src/openflexure_microscope_server/things/smart_scan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openflexure_microscope_server/things/smart_scan.py b/src/openflexure_microscope_server/things/smart_scan.py index 2557d532..d8ce6cf8 100644 --- a/src/openflexure_microscope_server/things/smart_scan.py +++ b/src/openflexure_microscope_server/things/smart_scan.py @@ -319,7 +319,8 @@ class SmartScanThing(OFMThing): # Error must be raised so UI gives correct output raise e except lt.exceptions.InvocationCancelledError as e: - # InvocationCancelledError is caught for scanning but not for stitching + # InvocationCancelledError is caught in `_run_scan` if it happens + # while scanning, but it propagates if it occurs during stitching. # If raised we still need to save the scan log. if self._ongoing_scan is not None: self._ongoing_scan.save_scan_log(self)