z_tilt: Raise a gcode.error() instead of directly calling respond_error()

Raising an error (instead of reporting an error) is important as only
a raised error will stop a print from virtual_sdcard.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2020-04-23 16:32:52 -04:00
parent 43fa41c1af
commit 3990d997de
2 changed files with 7 additions and 11 deletions

View File

@@ -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)