ObEngine
ObEngine copied to clipboard
No error message on EventGroup::trigger when using invalid event name
CustomGroup:trigger("invalid_name", { test = 3 })
Shows
"invalid map<K, T> key"
without a meaningful error
This error could be fixed around here : https://github.com/ObEngine/ObEngine/blob/1551bb50e412f7fa79213f1edfb9e002a7e52235/include/Core/Event/EventGroup.hpp#L239 And here as well : https://github.com/ObEngine/ObEngine/blob/1551bb50e412f7fa79213f1edfb9e002a7e52235/include/Core/Event/EventGroup.hpp#L203
Instead of blindly accessing the hashmap, we would check whether the key exists or not and throw a custom exception : https://github.com/ObEngine/ObEngine/blob/1551bb50e412f7fa79213f1edfb9e002a7e52235/include/Core/Event/Exceptions.hpp#L38