theshoeshiner commented on PR #1156:
URL: https://github.com/apache/commons-lang/pull/1156#issuecomment-1891079878

   > , I think the dispatcher should probably be ready to handle any error 
condition that can arise from calling a listener.
   
   I agree, but I think my intention was that the new fireAll method is the 
dispatcher specifically deciding how to handle the exceptions. Which is to say 
- it doesnt want its context to be interrupted by the exceptions.
   
   What if we allowed an error handler to be added to the EventListenerSupport 
instance? With the intention being that the fireAll method redirects all 
exceptions to the handler. The redirection would still be synchronous, but it 
would prevent the dispatcher from having to handle the exceptions in the same 
context as the fireAll() call. All exceptions are still "handled", but the 
dispatcher gets to fire events without a bunch of repetitive and potentially 
useless catch blocks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to