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

Exception types not subclassing a single SubstackException #28

Open
dmoklaf opened this issue Mar 1, 2024 · 0 comments
Open

Exception types not subclassing a single SubstackException #28

dmoklaf opened this issue Mar 1, 2024 · 0 comments

Comments

@dmoklaf
Copy link

dmoklaf commented Mar 1, 2024

All the library's exceptions inherit directly from Python's Exception which prevents from catching them in one go (exclusive of any other kind of exception) : one has to list explicitly each of these exception classes in one's exceptclause. Also, if some day another exception type is added by the library, it will escape this try...except piece of code.

This is not a bug, but an enhancement: having all substack exception types subclass a SubstackException(itself suclassing Exception) would make it easier for client code.

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

1 participant