-
Notifications
You must be signed in to change notification settings - Fork 48
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
API uses "bare" exceptions in multiple places #67
Comments
Similar case appears here. Failure from try-finally block is never handled. ue4cli/ue4cli/UE4BuildInterrogator.py Lines 165 to 176 in fed71c1
|
This one's a bit different, it's just letting any exceptions propagate up (for better or worse but from another function in the same module) but ensuring that clean-up happens either way. In this case, particularly, someone hitting Control-C into UBT and triggering a |
Hi @adamrehn
Per our conversation with @TBBle under #65, looks like there are several bare exceptions in current API.
This is considered a bad practice and non-Pythonic way of catching exceptions - reference1, reference2
It can potentially suppress unwanted exceptions and hide bugs. Something that we don't really want.
Fixing it right now is a bit risky, especially at this stage of the project. It would require some retesting and probably adding more code for edge cases. However, it would be a good change after all. I can try fixing it.
Let me know what do you think!
Example:
ue4cli/ue4cli/UnrealManagerBase.py
Lines 167 to 178 in fed71c1
For reference, grep shows at least 7 usages of bare exception:
The text was updated successfully, but these errors were encountered: