summaryrefslogtreecommitdiffstats
path: root/src/AssetManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/AssetManager.cpp')
-rw-r--r--src/AssetManager.cpp7
1 files changed, 6 insertions, 1 deletions
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 << "'";
+ }
}
}
}