diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py index 101d00b..a8ddc0a 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py @@ -3353,8 +3353,28 @@ class Flomni( " acquisition at this angle use tomo_acquire_at_angle(angle) instead.\x1b[0m" ) if not self.OMNYTools.yesno("Run a fermat scan anyway?", "n"): - print("Aborted. Use tomo_acquire_at_angle(angle) for a single-point acquisition.") - return + # Raise, don't silently return: this runs inside + # tomo_scan()'s per-angle loop (directly, or via a custom + # at_each_angle hook) as often as not, and a bare `return` + # here means the projection that was supposed to happen + # simply never did -- no exception, no incomplete status, + # no trace that data is now missing from the tomogram. A + # real incident: a hook that called this without + # _internal=True got asked at every angle, declining just + # skipped each one silently, and the eventual Ctrl-C (which + # tomo_queue_execute()'s `except Exception` does NOT catch, + # since KeyboardInterrupt isn't an Exception) left the job + # stuck at status "running" forever with no process behind + # it. Raising here means a decline now correctly fails the + # job, marks it "incomplete", and pauses the queue -- + # exactly the crash-resume contract tomo_queue_execute() + # already documents. + raise FlomniError( + "tomo_scan_projection: declined to run a Fermat scan while " + "single_point_instead_of_fermat_scan is on. Use " + "tomo_acquire_at_angle(angle) for a single-point acquisition, " + "or pass _internal=True to force the Fermat scan without asking." + ) dev.rtx.controller.laser_tracker_check_signalstrength()