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
Handle
inTransaction
throws in finally block
#2343
Comments
stevenschlansker
added a commit
that referenced
this issue
May 4, 2023
Thanks for pointing this out. I think it's even easier to fix by using try-with-resources. |
stevenschlansker
added a commit
that referenced
this issue
May 5, 2023
stevenschlansker
added a commit
that referenced
this issue
May 8, 2023
Hi @stevenschlansker, I was wondering when this will be released. |
@andru47 , sorry for the delay, our release process was broken for a bit. 3.38.3 should be out now with your fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the finally block of the Handle inTransaction, the isolation level is reset to the initial value.
If the transaction handler throws an error and resetting the isolation error throws an error as well, the error thrown by the transaction handler is ignored so we lose a lot of context about why the transaction actually failed.
Adding a catch block and storing the initial exception would allow adding suppressed exceptions in the finally block and hence we can display both exceptions to the user.
The text was updated successfully, but these errors were encountered: