The dump button throws an error in the first and logs in the second
Steps to reproduce the problem:
Open the example and start the webserver
Open the console
Click on the button "Publish the normal event"
Click on the button "Publish the dump event"
What is the expected result?
In both cases the data is correctly published and the second listener has no errors.
Therefore second listener should be called regardless of what happens in any others.
What happens instead?
The listeners are called in a loop without any errorhandling, so any errors cause subsequent listeners to no longer be called.
In this case step 5 does not call the second listener.
Any other information? (attach screenshot if possible)
The problem is in src/sap.ui.core/src/sap/ui/core/EventBus.js L. 231
A try catch statement is needed either here or in the _callListener function
Hello @Johan482 ,
Thank you for sharing this finding. I've created an internal incident DINC0085566. The status of the issue will be updated here in GitHub.
OpenUI5 version:
Any (originally found in 1.108.15 but the relevant code has not changed since)
Browser/version (+device/version):
Firefox 123.0 (64-Bit)
URL (minimal example if possible):
I created a small example based on the openui5 sample app (only changed the controller and view) https://github.com/Johan482/minExampleSAPUI5NoTryCatchEventbus It has 2 buttons which each publish an event that has 2 listeners.
Steps to reproduce the problem:
What is the expected result? In both cases the data is correctly published and the second listener has no errors. Therefore second listener should be called regardless of what happens in any others.
What happens instead? The listeners are called in a loop without any errorhandling, so any errors cause subsequent listeners to no longer be called. In this case step 5 does not call the second listener.
Any other information? (attach screenshot if possible) The problem is in src/sap.ui.core/src/sap/ui/core/EventBus.js L. 231 A try catch statement is needed either here or in the _callListener function