simpleeval
simpleeval copied to clipboard
Don't misuse KeyError for the custom `names` function.
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.