-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
cemo koc opened SPR-11551 and commented
org.springframework.context.event.SimpleApplicationEventMulticaster is responsible to multicast event to appropriate listeners.
An exception which is not handled by user is causing to stop other listeners. This behaviour can be annoying if you have 3rd party event listeners which are not handling exceptions. I think that an event listener should not prevent other listeners in case an error. For example, after a login event we are doing some sort of things one by one. Updating some tables, some numbers, calling a restful web service etc... An exception which is not caught is causing to stop other listeners.
I am considering two alternative approach:
Try-Catch and Log Only
In this approach all exceptions must be caught and logged.
Try-Catch and Throw Again at the end
The second approach I am considering is that an exception must be caught and after all can be thrown again.
What do you think?
Affects: 3.2.8
Referenced from: commits 49916bb