Error in exception handler
tdterry opened this issue · 2 comments
tdterry commented
Running 0.4.2, I found an interesting unhandled exception triggered by a bad expression syntax. Using the expression:
a == "b" ()
I get an exception 'Str' object has no attribute 'id'
AttributeError: 'Str' object has no attribute 'id'
...
[
".../lib/python2.7/site-packages/pql/matching.py",
171,
"handle",
"options=self.get_options())"
]
alonho commented
What did you actually try to achieve? What is the meaning of doing "b"()? (string isn't callable).
tdterry commented
It was from poorly converted user input. We trap ParseError to return an appropriate error message, but since it resulted an unhandled exception, I thought it should be reported.