You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.
I've a little situation when working with an Event handler on Exception and play with Group.
All the hoa exceptions are dispatch to event during execution of constructor.
that mean when working with Group, the exception are dispatch as like it was common exception.
And it's not what we should expect when working with Group, we may want analyse or raise the group in one time, and when child exceptions are in.
Maybe we could send event when Group::commitTransaction are call ?
and do not send event in constructor when it's Exception\Group instance,
but that mean it's a BC-Break
From now i found this great solution.
Use Exception\Idle as child of Group
In event handler, ignore Exception\Group when 0 === $exception->getStackSize()
Dispatch Exception\Group with $exception->send() when you're setup.
The text was updated successfully, but these errors were encountered:
You can use a Idle exception, it's exactly like Exception but without the event.
About group, hmm, it's not a BC break to change the place where events are fired I guess. But yes, a group should not fire any events actually :-/. If we fire an event each time we are commiting a set of exceptions, then a single “exception” can send multiple events and that's strange. I guess Group should extend Idle instead of Exception. But, this could be a BC break.
I've a little situation when working with an Event handler on Exception and play with Group.
All the hoa exceptions are dispatch to event during execution of constructor.
that mean when working with Group, the exception are dispatch as like it was common exception.
And it's not what we should expect when working with Group, we may want analyse or raise the group in one time, and when child exceptions are in.
Maybe we could send event when
Group::commitTransaction
are call ?and do not send event in constructor when it's
Exception\Group
instance,but that mean it's a BC-Break
From now i found this great solution.
Exception\Idle
as child of GroupException\Group
when0 === $exception->getStackSize()
Exception\Group
with$exception->send()
when you're setup.The text was updated successfully, but these errors were encountered: