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:
Kevin O'Connor 2019-12-16 19:16:58 -05:00
parent 254789f4c5
commit 665323eb29
3 changed files with 6 additions and 12 deletions

View file

@ -418,10 +418,7 @@ class GCodeParser:
self.respond_error("Heater not configured")
return
print_time = self.toolhead.get_last_move_time()
try:
heater.set_temp(print_time, temp)
except heater.error as e:
raise self.error(str(e))
heater.set_temp(print_time, temp)
if wait and temp:
self.bg_temp(heater)
# G-Code special command handlers