Task #3801: Improve EventBus implementation
Return error if there is listener being added to event which is not thrown
Right now it is possible to register in event bus to listen for event which may not be fired as ie. it is not implemented in this version - support added in future version but someone may try register. In this case now it will not know that there is no such event.
I think we should add check so that in this case error should be returned to user that there is no such event.
I do not think this is important at this point but before release of version 7.2.0, I think it may be good idea to add this feature.
#3822: Return error if there is listener being added to event which is not thrown
#3 Updated by Bartosz Małkowski about 3 years ago
- Status changed from New to In QA
- Assignee changed from Bartosz Małkowski to Andrzej Wójcik
As we discussed, it is hard to check it during registration listener, because it is possible that something want to listener for some events but event emiter may not be installed at all.
So I added event registration and EventBus may (configurable) throw exception in case of fire unknown event.
#4 Updated by Andrzej Wójcik about 3 years ago
- Status changed from In QA to Feedback
- Assignee changed from Andrzej Wójcik to Bartosz Małkowski
I think this is all we need, however I would suggest to add entry to log wtih FINEST level if there is no event for particular name, even if check is disabled.
It may help during analysis of possible issues, ie. when event name would change.