From 4f30dce64f16ad17ba471538fa3abe0e63f5b91f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 18 Nov 2016 12:42:39 -0500 Subject: homing: Add EndstopMoveError wrapper around EndstopError Allow an EndstopError to be raised without a destination position. Introduce EndstopMoveError wrapper so that current callers can continue to pass in a move destination. Signed-off-by: Kevin O'Connor --- klippy/cartesian.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'klippy/cartesian.py') diff --git a/klippy/cartesian.py b/klippy/cartesian.py index 706ebc5e..f6dc3685 100644 --- a/klippy/cartesian.py +++ b/klippy/cartesian.py @@ -84,8 +84,9 @@ class CartKinematics: and (end_pos[i] < self.limits[i][0] or end_pos[i] > self.limits[i][1])): if self.limits[i][0] > self.limits[i][1]: - raise homing.EndstopError(end_pos, "Must home axis first") - raise homing.EndstopError(end_pos) + raise homing.EndstopMoveError( + end_pos, "Must home axis first") + raise homing.EndstopMoveError(end_pos) def check_move(self, move): limits = self.limits xpos, ypos = move.end_pos[:2] -- cgit v1.2.3-70-g09d2