-
Notifications
You must be signed in to change notification settings - Fork 134
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
Remove any usage of bare exception. #4331
Conversation
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
@MaxJPRey To avoid codacy failure, I would recommand to not use |
@SMoraisAnsys I fully agree. I will do it. |
@MaxJPRey Since you are busy, feel free to let me do the changes. Just ping me so that I get notified 😄 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4331 +/- ##
===========================================
- Coverage 81.51% 34.63% -46.89%
===========================================
Files 109 109
Lines 53162 53156 -6
===========================================
- Hits 43337 18409 -24928
- Misses 9825 34747 +24922 |
@SMoraisAnsys It is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found 2 except Exception as e
left. Otherwise, all good for me :)
Thanks for the huge refactoring
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
2b49677
@MaxJPRey I cancelled the workflow before, because there are some unit test failing, apart from Codacy that is complaining. I will debug next week and try to find the issue. |
Base branch was modified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com> Co-authored-by: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com>
It's generally considered good practice to use
except Exception as e
: rather than a bareexcept:
because it avoids catching some exceptions that you typically don't want to catch, like keyboard interrupts and system exits. It also allows you to access and use the actual exception object, which can be helpful for debugging.