pql icon indicating copy to clipboard operation
pql copied to clipboard

Error in exception handler

Open tdterry opened this issue 10 years ago • 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())"
]

tdterry avatar Feb 27 '14 15:02 tdterry

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

alonho avatar Apr 25 '14 06:04 alonho

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.

tdterry avatar Apr 25 '14 20:04 tdterry