Capture ValueErrors, which covers most CSM errors, not all Exceptions

This commit is contained in:
jaknapper 2025-04-03 13:52:04 +01:00
parent 46d513d9e6
commit 67443ff939

View file

@ -206,7 +206,7 @@ class CameraStageMapper(Thing):
result: dict = calibrate_backlash_1d( result: dict = calibrate_backlash_1d(
tracker, move, direction_array, logger=logger tracker, move, direction_array, logger=logger
) )
except (InvocationCancelledError, Exception) as e: except (InvocationCancelledError, ValueError) as e:
logger.info("Returning to starting position") logger.info("Returning to starting position")
stage.move_absolute(**starting_position, block_cancellation=True) stage.move_absolute(**starting_position, block_cancellation=True)
raise e raise e