alonho/pql

Error in exception handler

tdterry opened this issue · 2 comments

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())"
]

What did you actually try to achieve? What is the meaning of doing "b"()? (string isn't callable).

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.