8000 Fix error reporting for unknown named operators · bmurr/python-jsonpath-rw@380184c · GitHub
[go: up one dir, main page]

Skip to content

Commit 380184c

Browse files
committed
Fix error reporting for unknown named operators
1 parent d7dfe10 commit 380184c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonpath_rw/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def p_jsonpath_named_operator(self, p):
9696
if p[1] == 'this':
9797
p[0] = This()
9898
else:
99-
raise Exception('Unknown named operator `%s` at %s:%s' % (t.value, t.lineno, t.col))
99+
raise Exception('Unknown named operator `%s` at %s:%s' % (p[1], p.lineno(1), p.lexpos(1)))
100100

101101
def p_jsonpath_root(self, p):
102102
"jsonpath : '$'"

0 commit comments

Comments
 (0)
0