-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Original exception is swallowed due rollback exception #11423
Comments
What if the logging fails? 😛 Right now there isn't a logger available in the Unit of Work, so I'm not sure how we could go about this… |
i think this is related to #7545 in a way, but i dont know for sure, because the original exception is swallowed regardless, the original exception should not be swallowed depending on a nullable PSR logger contract seems fine? try/catching log failures is an implementation detail per logger, we should consider it safe-calls |
I had 2 unworded thoughts I saw mentioned by Ocramius in #7545:
Reading the other threads, I see that deferred constraints are involved, is that your case as well? |
from doctrine/dbal#3423
this is the bug |
i dont know, because the original exception is swallowed
anything goes :) as long as we expose the original exception
i dont know, because the original exception is swallowed this could be some post-flush event exception |
After following the rabbit hole, I think the current work on what I think might be the root cause is #4846
Are you using Postgres?
Sound good, feel free to send a PR. |
is it considered a bugfix for 2.19? |
Hmmm… I guess it could be seen as a DX improvement, but one that could help us understand bugs in Doctrine. |
yup |
i believe it should be done like this https://github.com/etrias-nl/php-toolkit/blob/94a6486ab2dab405201751affc23bdb95fce422d/src/Messenger/Middleware/DoctrineTransactionMiddleware.php#L58-L74 i hope someone takes care of it on 2.x |
closing in favor of #7545, which has the bug label |
Bug Report
Summary
When rollback fails (eg. due
SAVEPOINT DOCTRINE_2 does not exist
) atorm/src/UnitOfWork.php
Line 485 in bdc41e2
Current behavior
Swallowed exception
How to reproduce
Expected behavior
Try/catch rollback and log its exception, so the original exception is actually thrown.
The text was updated successfully, but these errors were encountered: