diff --git a/klippy/extras/quad_gantry_level.py b/klippy/extras/quad_gantry_level.py index 4a66d577..31f6c8a4 100644 --- a/klippy/extras/quad_gantry_level.py +++ b/klippy/extras/quad_gantry_level.py @@ -84,11 +84,10 @@ class QuadGantryLevel: adjust_max = max(z_adjust) if adjust_max > self.max_adjust: - self.gcode.respond_error( - "Aborting quad_gantry_level " + - "required adjustment %0.6f " % ( adjust_max ) + - "is greater than max_adjust %0.6f" % (self.max_adjust)) - return + raise self.gcode.error("Aborting quad_gantry_level" + " required adjustment %0.6f" + " is greater than max_adjust %0.6f" + % (adjust_max, self.max_adjust)) speed = self.probe_helper.get_lift_speed() self.z_helper.adjust_steppers(z_adjust, speed) diff --git a/klippy/extras/z_tilt.py b/klippy/extras/z_tilt.py index 9784372e..e4f4b18a 100644 --- a/klippy/extras/z_tilt.py +++ b/klippy/extras/z_tilt.py @@ -94,10 +94,8 @@ class RetryHelper: return error = max(z_positions) - min(z_positions) if self.check_increase(error): - self.gcode.respond_error( - "Retries aborting: %s is increasing. %s" % ( - self.value_label, self.error_msg_extra)) - return + raise self.gcode.error("Retries aborting: %s is increasing. %s" + % (self.value_label, self.error_msg_extra)) self.gcode.respond_info( "Retries: %d/%d %s: %0.6f tolerance: %0.6f" % ( self.current_retry, self.max_retries, self.value_label, @@ -106,8 +104,7 @@ class RetryHelper: return "done" self.current_retry += 1 if self.current_retry > self.max_retries: - self.gcode.respond_error("Too many retries") - return + raise self.gcode.error("Too many retries") return "retry" class ZTilt: