heater: Use printer.command_error() instead of internal heater.error()
Use the more standard command_error to report invalid temperature requests. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -28,9 +28,9 @@ class PIDCalibrate:
|
||||
old_control = heater.set_control(calibrate)
|
||||
try:
|
||||
heater.set_temp(print_time, target)
|
||||
except heater.error as e:
|
||||
except self.printer.command_error as e:
|
||||
heater.set_control(old_control)
|
||||
raise self.gcode.error(str(e))
|
||||
raise
|
||||
self.gcode.bg_temp(heater)
|
||||
heater.set_control(old_control)
|
||||
if write_file:
|
||||
|
||||
Reference in New Issue
Block a user