simpleeval icon indicating copy to clipboard operation
simpleeval copied to clipboard

Don't misuse KeyError for the custom `names` function.

Open danthedeckie opened this issue 1 year ago • 1 comments

Description

See #94

Makes KeyError and stuff a bit more friendly for users using a custom names lookup.

If their names function throws a KeyError unexpectedly, it was getting caught incorrectly.

This expands the documentation & makes it so that people using a custom names resolver should deliberately only throw a simpleeval.NameNotDefined, other exceptions would be raised correctly.

danthedeckie avatar Feb 17 '23 09:02 danthedeckie