Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnvError should inherit from ValueError #50

Merged
merged 1 commit into from
Dec 10, 2018
Merged

EnvError should inherit from ValueError #50

merged 1 commit into from
Dec 10, 2018

Conversation

sacha-sentier
Copy link
Contributor

Hello,

I feel like EnvError should inherit from ValueError instead of the generic Exception.

For instance, env.int of "foo" will raise EnvError, while int("foo") raises ValueError.

It seems to me that both EnvError and ValueError refer to an error inside the value that cannot be safely typecasted. Since ValueError is just a generalization of EnvError, EnvError should inherit from it.

@sloria
Copy link
Owner

sloria commented Dec 10, 2018

Makes sense. Thanks!

@sloria sloria merged commit 4d68c32 into sloria:master Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants