theshoeshiner commented on PR #1156: URL: https://github.com/apache/commons-lang/pull/1156#issuecomment-1887171852
> I'm not sure how this is all supposed to work, but in general I get very nervous about anything that silently catches and swallows random exceptions. Dispatching to all and collecting their resulting exceptions to bundle and rethrow after every listener has had a chance seems like a better option. I do like the idea of bundling the exceptions, and this pattern is used in `org.apache.commons.io.input.ObservableInputStream`, so I could use that as a guide. However It still feels like there should be an optional path for firing events and not being forced to catch exceptions. It would be nice if they could be _returned_ instead of thrown, but Im not sure that's possible given that the proxy must honor the listener interface - will look into it though. Ultimately if they were bundled, they would probably need to be packaged into some unchecked exception class - e.g. EventListenerExceptionList, and I suppose if my specific use case requires swallowing exceptions I could maybe write my own extension that swallows + logs that. -- 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]
