Skip to content
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

[Bug]: return in finally swallows exceptions #85

Open
iritkatriel opened this issue Oct 24, 2024 · 2 comments
Open

[Bug]: return in finally swallows exceptions #85

iritkatriel opened this issue Oct 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@iritkatriel
Copy link

Describe the bug

There are several places in your code (listed below) where there is a return statement in a finally block, which would swallow any in-flight exception.

This means that if an unhandled exception (including a BaseException such as KeyboardInterrupt) is raised from the try body, or any exception is raised from one of the except: clauses, it will not propagate on as expected.

See also https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.

return self.session_id

return self.session_id

return session_id

Steps to reproduce

No response

Model Used

No response

Expected Behavior

No response

Screenshots and logs

No response

Additional Information

No response

@iritkatriel iritkatriel added the bug Something isn't working label Oct 24, 2024
@sonichi
Copy link
Collaborator

sonichi commented Nov 1, 2024

Thanks @iritkatriel . Would you like to make a PR?

@iritkatriel
Copy link
Author

Don't wait on me, go ahead.

odoochain pushed a commit to odoochain/autogen that referenced this issue Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants