diff --git a/lib/libimhex/include/hex/api/event_manager.hpp b/lib/libimhex/include/hex/api/event_manager.hpp index 10d1b4f25..e03f07edc 100644 --- a/lib/libimhex/include/hex/api/event_manager.hpp +++ b/lib/libimhex/include/hex/api/event_manager.hpp @@ -163,7 +163,11 @@ namespace hex { for (const auto &[id, event] : getEvents()) { if (id == E::Id) { - (*static_cast(event.get()))(std::forward(args)...); + try { + (*static_cast(event.get()))(std::forward(args)...); + } catch (const std::exception &e) { + log::error("Event '{}' threw {}: {}", wolv::type::getTypeName(), wolv::type::getTypeName(), e.what()); + } } }