-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: catch exceptions from detach calls #20656
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ComponentTest.testAttachDetachListeners_parentAttachDetach_childListenersTriggered
could probably be used to create a test that collects the correct amount of events even if one of the listeners throws.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The only concern is that this could be some sort of behavioral breaking change, since it doesn't break the application as before, but it "silently" continues the execution (although errors should be logged, unless a custom error handler suppresses them).
It would probably be good to highlight the change in the release notes.
|
* fix: catch exceptions from detach calls * add test --------- Co-authored-by: Marco Collovati <[email protected]>
* fix: catch exceptions from detach calls * add test --------- Co-authored-by: Marco Collovati <[email protected]>
* fix: catch exceptions from detach calls * add test --------- Co-authored-by: Marco Collovati <[email protected]>
* fix: catch exceptions from detach calls * add test --------- Co-authored-by: Teppo Kurki <[email protected]> Co-authored-by: Marco Collovati <[email protected]>
* fix: catch exceptions from detach calls * add test --------- Co-authored-by: Teppo Kurki <[email protected]> Co-authored-by: Marco Collovati <[email protected]>
* fix: catch exceptions from detach calls * add test --------- Co-authored-by: Teppo Kurki <[email protected]> Co-authored-by: Marco Collovati <[email protected]>
Wraps detach listener calls and onDetach calls into try-catch blocks so all
possible exceptions are handled by session ErrorHandler, and they will not
interrupt running the remaining detach handlers.
Fixes #20577