Properly Handle Nested Dispatches #19

Merged
kske merged 3 commits from b/nested-dispatch into develop 2021-07-12 11:25:05 +02:00
Owner

Instead of setting a boolean when a dispatch happens, an integer is incremented when the dispatch begins and decremented when it ends, thus keepnig track of nested calls to the dispatch method.

In addition, a minor bug has been fixed that caused errors (for example thrown by a JUnit assertion) to be handled using an exception event instead of being transparently propagated to the caller as intended.

Fixes #18

Instead of setting a boolean when a dispatch happens, an integer is incremented when the dispatch begins and decremented when it ends, thus keepnig track of nested calls to the `dispatch` method. In addition, a minor bug has been fixed that caused errors (for example thrown by a JUnit assertion) to be handled using an exception event instead of being transparently propagated to the caller as intended. Fixes #18
kske added the
core
bug
labels 2021-07-12 10:23:09 +02:00
kske self-assigned this 2021-07-12 10:23:09 +02:00
kske added 3 commits 2021-07-12 10:23:10 +02:00
When an error is caused during the dispatch of a system event, a warning
has been logged instead instead of rethrowing the error. This has been
fixed.

This enables failing a JUnit test when an exception event handler is
invoked.
The test performs a nested event dispatch then cancels the dispatch. If
Both operations are successful, the test is successful.

Currently, the test fails, but should be successful once the nested
dispatch bug is fixed.
kske requested review from delvh 2021-07-12 10:23:19 +02:00
delvh approved these changes 2021-07-12 11:16:18 +02:00
kske merged commit b915a5c490 into develop 2021-07-12 11:25:05 +02:00
kske deleted branch b/nested-dispatch 2021-07-12 11:25:08 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: zdm/event-bus#19
No description provided.