Skip to content

Conversation

@gavinking
Copy link
Member

and refresh code in ExceptionConverterImpl

+ refresh code in ExceptionConverterImpl
@hibernate-github-bot
Copy link

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [8a066a3]

› This message was automatically generated.

@dreab8
Copy link
Member

dreab8 commented Oct 7, 2022

Hi @gavinking,

I'm not sure why we are returning a RollbackException but I think it is not correct so I created #5247
what do you think?

@gavinking
Copy link
Member Author

Um where precisely? Did I mess up?

@dreab8
Copy link
Member

dreab8 commented Oct 7, 2022

no you don't I think it was messed up, I believe but I may be wrong that it is not quite correct to always throw a RollbackException when converting a commit exception.

@gavinking
Copy link
Member Author

Ah Ok i will take a closer look when I get back home.

@gavinking
Copy link
Member Author

gavinking commented Oct 7, 2022

@dreadb8 I might be wrong, but the existing behavior looks correct-ish to me.

The spec says:

The RollbackException is thrown by the persistence provider when EntityTransaction.commit fails.

and the Javadoc for Transaction.commit() saysL

@throws RollbackException if the commit fails

which looks like what the code does currently.

Why do you think it's wrong?

@dreab8
Copy link
Member

dreab8 commented Oct 7, 2022

ok, so just my bad interpretation of the RollbackException, sorry for the noise :( and thanks for the explanation :)

@gavinking
Copy link
Member Author

OK, cool 👍

@gavinking gavinking merged commit 635c23b into hibernate:main Oct 7, 2022
@gavinking gavinking deleted the exception_converter branch June 15, 2023 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants