changeset 28720 | 639e0f1e8ffa |
parent 26231 | 87c9c562c37a |
child 28870 | 475dad3432fd |
--- a/mercurial/parser.py Fri Apr 01 21:18:24 2016 +0800 +++ b/mercurial/parser.py Mon Feb 29 17:02:56 2016 +0900 @@ -220,3 +220,11 @@ simplified.append(simplifyinfixops(x, targetnodes)) simplified.append(op) return tuple(reversed(simplified)) + +def parseerrordetail(inst): + """Compose error message from specified ParseError object + """ + if len(inst.args) > 1: + return _('at %s: %s') % (inst.args[1], inst.args[0]) + else: + return inst.args[0]