mirror of
https://github.com/andreili/klipper.git
synced 2025-08-23 19:34:06 +02:00
gcode_macro: more descriptive "unable to parse as a literal" error - display faulty command
Signed-off-by: Mateusz Szwedka <matszwe02@gmail.com>
This commit is contained in:
parent
81277154d2
commit
9aba1a8536
@ -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…
x
Reference in New Issue
Block a user