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

Fix previous exception rethrow on transaction rollback #7546

Closed
wants to merge 1 commit into from
Closed

Fix previous exception rethrow on transaction rollback #7546

wants to merge 1 commit into from

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Dec 28, 2018

"Fixes" #7545

Not sure if proper fix, was checking DBAL's code and everything is IMO just fine there. So my goal was to keep both exceptions in ORM's code.

Or do you have ideas for a better way to fix?

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely no-go.

As described in #7545 (comment), the exception coming from a failed rollback is indeed much more important here.

@simPod
Copy link
Contributor Author

simPod commented Dec 28, 2018

🤔 and how can ORM's user fix failing rollbacks then when it's impossible to find its origin? Only thing user knows is that rollback failed. Why, is a mystery.

@Ocramius
Copy link
Member

You can design an exception with two previous traces. See #6743 for examples on how we improved this for ORM 3.x.

Right now, changing the exception type being thrown for a failed rollback would be a subtle BC break, so please look at that patch and propose a separate solution for 3.x, if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants