Event Handler Exception Handling With Events #11
Labels
No Label
1
13
2
21
3
34
5
55
8
bug
core
could have
duplicate
enhancement
help wanted
must have
proc
question
should have
wont have
L
M
S
XL
bug
bugfix
discussion
documentation
feature
maintenance
postponed
refactoring
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: zdm/event-bus#11
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
At the moment, an exception thrown by an event handler is propagated back to the caller of
EventBus#dispatch(Object)
as an uncheckedEventBusException
.This behavior could be improved by introducing an
ExceptionEvent
which is similar toDeadEvent
as they both wrap other events and can only be dispatched by the event bus.With this event, unexpected exceptions can be handled in a clean and centralized way.
Exception events must not cause dead events as this might cause an indirect recursion when a dead event handler throws an exception. Instead, system events (
DeadEvent
andExceptionEvent
) should not be able to produce instances of other system events.