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

Base class for all errors in the library #43

Closed
besfahbod opened this issue Apr 8, 2020 · 2 comments
Closed

Base class for all errors in the library #43

besfahbod opened this issue Apr 8, 2020 · 2 comments

Comments

@besfahbod
Copy link

Would be great to have a single "base" class for all errors that could be raised by the library.

Looking at https://github.com/stub42/pytz/blob/master/src/pytz/exceptions.py, there are two base classes at the moment: UnknownTimeZoneError and InvalidTimeError.

Without a guaranteed single base class, a package upgrade may add new error types, without call-sites being updated about the change.

@stub42
Copy link
Owner

stub42 commented Apr 14, 2020

Agreed. I'm surprised they don't already share a base class.

@stub42 stub42 closed this as completed in 238b4f6 Apr 28, 2020
@besfahbod
Copy link
Author

Thanks for taking care of this, @stub42! :)

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

No branches or pull requests

2 participants