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

changing BaseException to Exception so they follow Pep8 and are catchable without catching BaseExceptions #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yeroshalmimLF
Copy link

This is my first public PR so bear with me if anything is wrong.

You are currently using BaseExceptions where Exceptions should be. Base Exceptions are for things like keyboard interrupts or quitting the program.

The normal except Exception as e: wont catch BaseExceptions which is how I found this as I was smashing my head into the desk wondering why your exceptions were stalling my asynchronous program and not being caught/handled.

A good explanation can be found here if you want more info: https://stackoverflow.com/questions/27995057/why-is-it-recommended-to-derive-from-exception-instead-of-baseexception-class-in
or in the PEP guide here: https://peps.python.org/pep-0008/#programming-recommendations

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.

1 participant