mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-01-06 06:47:43 -07:00
gcode_macro: more descriptive "unable to parse as a literal" error - display faulty command
Some checks are pending
Build test / build (push) Waiting to run
Some checks are pending
Build test / build (push) Waiting to run
Signed-off-by: Mateusz Szwedka <matszwe02@gmail.com>
This commit is contained in:
parent
81277154d2
commit
9aba1a8536
1 changed files with 2 additions and 2 deletions
|
|
@ -178,8 +178,8 @@ class GCodeMacro:
|
|||
literal = ast.literal_eval(value)
|
||||
json.dumps(literal, separators=(',', ':'))
|
||||
except (SyntaxError, TypeError, ValueError) as e:
|
||||
raise gcmd.error("Unable to parse '%s' as a literal: %s" %
|
||||
(value, e))
|
||||
raise gcmd.error("Unable to parse '%s' as a literal: %s in '%s'" %
|
||||
(value, e, gcmd.get_commandline()))
|
||||
v = dict(self.variables)
|
||||
v[variable] = literal
|
||||
self.variables = v
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue