summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenn Knowles <kenn.knowles@gmail.com>2013-06-14 17:59:46 -0400
committerKenn Knowles <kenn.knowles@gmail.com>2013-06-14 17:59:46 -0400
commit380184cf8a014e4e85de7ae19d2286dcaaa570bc (patch)
tree022169e926718c52ab7dac8e7feae33e2ae21372
parentd7dfe10d6244a7f2105e512e93183d2b3bd38897 (diff)
downloadjsonpath-rw-380184cf8a014e4e85de7ae19d2286dcaaa570bc.tar.gz
Fix error reporting for unknown named operators
-rw-r--r--jsonpath_rw/parser.py2
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 : '$'"