-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
Getting the wrong exception type when expression uses all
Expect to get an CELEvalError but instead of a TypeError
import celpy
from celpy import CELEvalError
env = celpy.Environment()
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
all_positive = "data.all(x, x>0)"
breaks = {'data_': [1, 2, 3] }
ast = env.compile(all_positive)
prgm = env.program(ast)
try:
prgm.evaluate(breaks)
except CELEvalError as ex:
print('Got an evaluation error')
except TypeError as ex:
print('Got a type error')
Happy to try and fix with some guidance
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested