diff options
author | Kenn Knowles <kenn.knowles@gmail.com> | 2013-06-14 17:59:46 -0400 |
---|---|---|
committer | Kenn Knowles <kenn.knowles@gmail.com> | 2013-06-14 17:59:46 -0400 |
commit | 380184cf8a014e4e85de7ae19d2286dcaaa570bc (patch) | |
tree | 022169e926718c52ab7dac8e7feae33e2ae21372 | |
parent | d7dfe10d6244a7f2105e512e93183d2b3bd38897 (diff) | |
download | jsonpath-rw-380184cf8a014e4e85de7ae19d2286dcaaa570bc.tar.gz |
Fix error reporting for unknown named operators
-rw-r--r-- | jsonpath_rw/parser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jsonpath_rw/parser.py b/jsonpath_rw/parser.py index 21bd5d3..d8bd6a6 100644 --- a/jsonpath_rw/parser.py +++ b/jsonpath_rw/parser.py @@ -96,7 +96,7 @@ class JsonPathParser(object): if p[1] == 'this': p[0] = This() else: - raise Exception('Unknown named operator `%s` at %s:%s' % (t.value, t.lineno, t.col)) + raise Exception('Unknown named operator `%s` at %s:%s' % (p[1], p.lineno(1), p.lexpos(1))) def p_jsonpath_root(self, p): "jsonpath : '$'" |