diff options
Diffstat (limited to 'src/crepe/manager/SystemManager.cpp')
-rw-r--r-- | src/crepe/manager/SystemManager.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/crepe/manager/SystemManager.cpp b/src/crepe/manager/SystemManager.cpp index eabc022..c8f4f3d 100644 --- a/src/crepe/manager/SystemManager.cpp +++ b/src/crepe/manager/SystemManager.cpp @@ -31,17 +31,25 @@ SystemManager::SystemManager(Mediator & mediator) : Manager(mediator) { this->mediator.system_manager = *this; } -void SystemManager::fixed_update() { - for (System & system : this->system_order) { - if (!system.active) continue; - system.fixed_update(); +void SystemManager::fixed_update() noexcept { + for (SystemEntry & entry : this->system_order) { + if (!entry.system.active) continue; + try { + entry.system.fixed_update(); + } catch (const exception & e) { + Log::logf(Log::Level::WARNING, "Uncaught exception in {} fixed update: {}", entry.name, e.what()); + } } } -void SystemManager::frame_update() { - for (System & system : this->system_order) { - if (!system.active) continue; - system.frame_update(); +void SystemManager::frame_update() noexcept { + for (SystemEntry & entry : this->system_order) { + if (!entry.system.active) continue; + try { + entry.system.frame_update(); + } catch (const exception & e) { + Log::logf(Log::Level::WARNING, "Uncaught exception in {} frame update: {}", entry.name, e.what()); + } } } |