mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-12-21 15:49:57 +01:00
kinematic_stepper: Fixed reporting of parse errors
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
committed by
KevinOConnor
parent
baf188bd62
commit
0ba01beaa8
@@ -24,7 +24,7 @@ def parse_carriages_string(carriages_str, printer_carriages, parse_error):
|
|||||||
try:
|
try:
|
||||||
coeff = float(term_lst[0])
|
coeff = float(term_lst[0])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise error("Invalid float '%s'" % term_lst[0])
|
raise parse_error("Invalid float '%s'" % term_lst[0])
|
||||||
else:
|
else:
|
||||||
coeff = -1. if term_lst[0].startswith('-') else 1.
|
coeff = -1. if term_lst[0].startswith('-') else 1.
|
||||||
if term_lst[0].startswith('-') or term_lst[0].startswith('+'):
|
if term_lst[0].startswith('-') or term_lst[0].startswith('+'):
|
||||||
@@ -36,8 +36,8 @@ def parse_carriages_string(carriages_str, printer_carriages, parse_error):
|
|||||||
carriage = printer_carriages[c]
|
carriage = printer_carriages[c]
|
||||||
j = carriage.get_axis()
|
j = carriage.get_axis()
|
||||||
if coeffs[j]:
|
if coeffs[j]:
|
||||||
raise error("Carriage '%s' was referenced multiple times in '%s'" %
|
raise parse_error("Axis '%s' was referenced multiple times by "
|
||||||
(c, carriages_str))
|
"carriages in '%s'" % ("xyz"[j], carriages_str))
|
||||||
coeffs[j] = coeff
|
coeffs[j] = coeff
|
||||||
ref_carriages.append(carriage)
|
ref_carriages.append(carriage)
|
||||||
nxt = end
|
nxt = end
|
||||||
|
|||||||
Reference in New Issue
Block a user