Fixed import and re-raise cancelled error
This commit is contained in:
parent
a506625e40
commit
33c74741fe
1 changed files with 2 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ from camera_stage_mapping.camera_stage_calibration_1d import (
|
|||
calibrate_backlash_1d,
|
||||
image_to_stage_displacement_from_1d,
|
||||
)
|
||||
from camera_stage_mapping.exceoptions import MappingError
|
||||
from camera_stage_mapping.exceptions import MappingError
|
||||
from labthings_fastapi.dependencies.invocation import (
|
||||
InvocationCancelledError,
|
||||
InvocationLogger,
|
||||
|
|
@ -211,6 +211,7 @@ class CameraStageMapper(Thing):
|
|||
logger.info("User cancelled the camera stage mapping calibration")
|
||||
logger.info("Returning to starting position")
|
||||
stage.move_absolute(**starting_position, block_cancellation=True)
|
||||
raise e
|
||||
except MappingError as e:
|
||||
logger.info("Returning to starting position due to failed calibration")
|
||||
stage.move_absolute(**starting_position, block_cancellation=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue