gcode: Propagate errors from run_script()
If the script being run raises an error, then stop running that script and return the error to the caller. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
67f9c4948d
commit
3ddbd34a7c
|
@ -161,11 +161,15 @@ class GCodeParser:
|
|||
except error as e:
|
||||
self.respond_error(str(e))
|
||||
self.reset_last_position()
|
||||
if not need_ack:
|
||||
raise
|
||||
except:
|
||||
msg = 'Internal error on command:"%s"' % (cmd,)
|
||||
logging.exception(msg)
|
||||
self.printer.invoke_shutdown(msg)
|
||||
self.respond_error(msg)
|
||||
if not need_ack:
|
||||
raise
|
||||
self.ack()
|
||||
self.need_ack = prev_need_ack
|
||||
def process_data(self, eventtime):
|
||||
|
|
Loading…
Reference in New Issue