-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
all except BaseException should be except Exception #2444
Comments
except BaseException
should be except Exception
For 2441 BaseException makes sense, especially because it just re-raise exception |
@asvetlov it is actual again. We need a linter. See aiohttp/aiohttp/client_reqrep.py Line 974 in 7a324fd
close() prevent, for example, exitting from the application.
|
No. Exception in |
Yes, unwinds, but exception in |
Chicken-egg problem. |
There are plenty of exceptions, which are not errors actually. It's wrong design. Like Stopiteration,systemexit,Cancellederror....We should close something only by ERROR. If someone raises such exceptions it should understand what will happen. That's my opinion. |
Long story short
#2383 fixed flake8 blind exception, but later for example #2441 used
except BaseException
It should be fixed separately in 2.3 and master branches
Expected behaviour
everywhere should be
except Exception
Actual behaviour
Some parts of code uses
except Exception
, someexcept BaseException
The text was updated successfully, but these errors were encountered: