Transparently Propagate Event Handler Errors #14

Merged
kske merged 1 commits from b/error-passthrough into develop 2021-03-16 08:17:42 +01:00

When an exception occurs during the execution of an event handler, it is
caught, wrapped inside an exception event and dispatched on the event
bus.

This applies to any throwable, but is not very useful for errors, as
these are not normally caught. Assertion errors in particular, which are
used in unit tests, should not be caught, as this would cause the test
runner to miss a failed test.

Therefore, errors are now transparently passed through to the caller of
the dispatch method.

When an exception occurs during the execution of an event handler, it is caught, wrapped inside an exception event and dispatched on the event bus. This applies to any throwable, but is not very useful for errors, as these are not normally caught. Assertion errors in particular, which are used in unit tests, should not be caught, as this would cause the test runner to miss a failed test. Therefore, errors are now transparently passed through to the caller of the dispatch method.
kske added the
bug
core
should have
labels 2021-03-15 08:36:05 +01:00
kske self-assigned this 2021-03-15 08:36:05 +01:00
kske added 1 commit 2021-03-15 08:36:05 +01:00
122106bf39
Transparently propagate event handler errors
When an exception occurs during the execution of an event handler, it is
caught, wrapped inside an exception event and dispatched on the event
bus.

This applies to any throwable, but is not very useful for errors, as
these are not normally caught. Assertion errors in particular, which are
used in unit tests, should not be caught, as this would cause the test
runner to miss a failed test.

Therefore, errors are now transparently passed through to the caller of
the dispatch method.
kske requested review from delvh 2021-03-15 08:36:09 +01:00
kske requested review from mpk 2021-03-15 08:36:09 +01:00
delvh approved these changes 2021-03-15 09:07:10 +01:00
delvh left a comment
Owner

👍

👍
mpk approved these changes 2021-03-15 17:52:18 +01:00
mpk left a comment
Owner

What a hell lof of a change

What a hell lof of a change
kske merged commit 52719d22d4 into develop 2021-03-16 08:17:42 +01:00
kske deleted branch b/error-passthrough 2021-03-16 08:17:47 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 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#14
There is no content yet.