Allow to Override Exception Catching Mechanism #31

Closed
opened 2022-01-07 19:01:38 +01:00 by delvh · 0 comments
Owner

There are times when it would be useful to actually rethrow an exception encountered during event dispatch, i.e. when testing.
Currently, the workarounds are to manually add the relevant object to the event listeners and an ExceptionEvent listener, or to throw an actual Error which is in most cases not present previously. Both approach, however, don't scale well as you have to write a lot of code or simply don't work when you cannot modify the corresponding code.
Hence, it would be good if there was any way to throw an exception so hard that event bus has no choice but to rethrow it.

There are times when it would be useful to actually rethrow an exception encountered during event dispatch, i.e. when testing. Currently, the workarounds are to manually add the relevant object to the event listeners and an `ExceptionEvent` listener, or to throw an actual `Error` which is in most cases not present previously. Both approach, however, don't scale well as you have to write a lot of code or simply don't work when you cannot modify the corresponding code. Hence, it would be good if there was any way to throw an exception so hard that event bus has no choice but to rethrow it.
delvh added the
enhancement
should have
5
21
labels 2022-01-07 19:01:38 +01:00
delvh removed the
21
label 2022-01-07 19:02:38 +01:00
kske self-assigned this 2022-01-08 09:51:57 +01:00
kske closed this issue 2022-01-08 16:54:06 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
1 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#31
No description provided.