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

Conversation

@alexpirine
Copy link
Contributor

commented Nov 29, 2018

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

This comment has been minimized.

Copy link
Owner

commented Dec 10, 2018

Makes sense. Thanks!

@sloria sloria merged commit 4d68c32 into sloria:master Dec 10, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.