From 8c5320a94b4c91f2801c05766f6a1747de42a2e5 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 18 May 2019 18:12:56 +0500 Subject: Implemented more scripting APIs --- src/AssetManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/AssetManager.cpp') diff --git a/src/AssetManager.cpp b/src/AssetManager.cpp index ba2b4f4..eb3186a 100644 --- a/src/AssetManager.cpp +++ b/src/AssetManager.cpp @@ -115,7 +115,12 @@ void LoadScripts() { LOG(ERROR) << "Unrecognised script file /" << it->name; continue; } - PluginSystem::Execute(asset->code); + try { + PluginSystem::Execute(asset->code, true); + } + catch (std::exception& e) { + LOG(ERROR) << "Failed loading script '" << script->name << "' in '" << it->name << "'"; + } } } } -- cgit v1.2.3