-
Notifications
You must be signed in to change notification settings - Fork 74
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
Preserve original exceptions in parameters #341
Conversation
src/ActionEventEmitterEventStore.php
Outdated
} | ||
|
||
if ($event->getParam('concurrencyException', false)) { | ||
throw new ConcurrencyException(); | ||
throw $event->getParam('concurrencyException'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why get twice? just do if ($exception = $event->getParam('concurrencyException', false)) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like assignments in ifs but sure, I'll change it.
@prolic Done. The coding style failure is not related. |
There isn't much I can do in tests for this change - the exceptions didn't really change, except for their their callstack and I don't think we want to test that. Also I briefly tested it on my project along with pdo-event-store 1.9.0. It works as expected. The error I struggled with would be much easier to debug now. |
@enumag Can you also update |
Oh, I missed a class again lol. Sure, I'll update it tomorrow. |
Thanks
…On Tue, Jun 12, 2018, 00:02 Jáchym Toušek ***@***.***> wrote:
Oh, I missed a class again lol. Sure, I'll update it tomorrow.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#341 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYEvPU_IxzdAbZiGY5lbAhF211n3dylks5t7pSjgaJpZM4UevJG>
.
|
@prolic Done. |
Note: This is a quick edit using GitHub editor. I didn't really check or test it yet.