diff options
Diffstat (limited to 'src/crepe/system')
-rw-r--r-- | src/crepe/system/ScriptSystem.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/crepe/system/ScriptSystem.cpp b/src/crepe/system/ScriptSystem.cpp index f1e31f9..ed0c7cc 100644 --- a/src/crepe/system/ScriptSystem.cpp +++ b/src/crepe/system/ScriptSystem.cpp @@ -32,29 +32,10 @@ void ScriptSystem::update( if (script == nullptr) continue; if (!script->initialized) { - try { - script->init(); - script->initialized = true; - } catch (const exception & e) { - Log::logf( - Log::Level::WARNING, - "Disabled script \"{}\" due to exception in init function: {}", - behavior_script.name, e.what() - ); - behavior_script.active = false; - } + script->init(); + script->initialized = true; } - try { - (*script.*update_function)(delta_time); - } catch (const exception & e) { - // TODO: discern between fixed/frame update - Log::logf( - Log::Level::WARNING, - "Disabled script \"{}\" due to exception in update function: {}", - behavior_script.name, e.what() - ); - behavior_script.active = false; - } + (*script.*update_function)(delta_time); } } |