redvid icon indicating copy to clipboard operation
redvid copied to clipboard

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

Open AStrayByte opened this issue 1 year ago • 0 comments

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

AStrayByte avatar Jul 27 '24 17:07 AStrayByte