aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/homing.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-06-03 13:01:57 -0400
committerKevinOConnor <kevin@koconnor.net>2019-06-06 10:08:58 -0400
commit67964e71f17df13e03a0aaa1a6dcd6c9253da97d (patch)
tree3523e450c42e00ceb4a19d113bf5c17d4f47379c /klippy/homing.py
parente9935e1a41be3ddfd20233d88c5f524283c935b3 (diff)
downloadkutter-67964e71f17df13e03a0aaa1a6dcd6c9253da97d.tar.gz
kutter-67964e71f17df13e03a0aaa1a6dcd6c9253da97d.tar.xz
kutter-67964e71f17df13e03a0aaa1a6dcd6c9253da97d.zip
homing: Catch the more generic CommandError during homing
Allow the low-level homing code to raise either a gcode.error or an EndstopError during a fault. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/homing.py')
-rw-r--r--klippy/homing.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/klippy/homing.py b/klippy/homing.py
index ce37487d..c6e1ba83 100644
--- a/klippy/homing.py
+++ b/klippy/homing.py
@@ -61,7 +61,7 @@ class Homing:
error = None
try:
self.toolhead.move(movepos, speed)
- except EndstopError as e:
+ except CommandError as e:
error = "Error during homing move: %s" % (str(e),)
# Wait for endstops to trigger
move_end_print_time = self.toolhead.get_last_move_time()
@@ -80,11 +80,11 @@ class Homing:
for mcu_endstop, name in endstops:
try:
mcu_endstop.home_finalize()
- except EndstopError as e:
+ except CommandError as e:
if error is None:
error = str(e)
if error is not None:
- raise EndstopError(error)
+ raise CommandError(error)
# Check if some movement occurred
if verify_movement:
for s, name, pos in start_mcu_pos:
@@ -142,7 +142,7 @@ class Homing:
self.changed_axes = axes
try:
self.toolhead.get_kinematics().home(self)
- except EndstopError:
+ except CommandError:
self.toolhead.motor_off()
raise