Commit 6e490550 authored by di68kap's avatar di68kap

- allow formatted strings in configured error messages

parent a3f78cab
......@@ -1418,8 +1418,7 @@ class Series(NaryOperator):
# # location, Error.MESSAGE))
found = text_[:10].replace('\n', '\\n ')
if self.errmsg:
msg = self.errmsg % found if self.errmsg.find("%s") >= 0 \
else self.errmsg
msg = self.errmsg.format(parser.repr, found)
else:
msg = '%s expected, "%s" found!' % (parser.repr, found)
mandatory_violation = Error(msg, location, Error.MANDATORY_CONTINUATION)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment