Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.
This repository was archived by the owner on Sep 20, 2021. It is now read-only.

Group behavior beside Event #5

@Pierozi

Description

@Pierozi

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.

  1. Use Exception\Idle as child of Group
  2. In event handler, ignore Exception\Group when 0 === $exception->getStackSize()
  3. Dispatch Exception\Group with $exception->send() when you're setup.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions