You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use of BaseException should be changed to a set of specific exceptions which are thrown.
Motivation
The codebase should more strictly follow Python convention to hopefully improve maintainability.
Details
Due to the use of requests, some errors which are thrown from the cdn_check.py module, are not defined exceptions and are instead names of websites. This is something I have not been able to completely catch every exception that has occurred. We want to enforce the use of exceptions in this specific spot because, if an error gets thrown, the parent process may not exit and we will be left with a hung parent process. This is to assure the program at least kills the thread worker created even if we did not expect a specific exception.
Proposal
The use of
BaseException
should be changed to a set of specific exceptions which are thrown.Motivation
The codebase should more strictly follow Python convention to hopefully improve maintainability.
Details
Due to the use of requests, some errors which are thrown from the
cdn_check.py
module, are not defined exceptions and are instead names of websites. This is something I have not been able to completely catch every exception that has occurred. We want to enforce the use of exceptions in this specific spot because, if an error gets thrown, the parent process may not exit and we will be left with a hung parent process. This is to assure the program at least kills the thread worker created even if we did not expect a specific exception.findcdn/src/findcdn/cdnengine/cdnengine.py
Line 59 in 46073ff
The text was updated successfully, but these errors were encountered: