summaryrefslogtreecommitdiffstats
path: root/src/AssetManager.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-05-18 15:12:56 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-05-18 15:16:09 +0200
commit8c5320a94b4c91f2801c05766f6a1747de42a2e5 (patch)
tree549f3f5978ab9edd160325df52725cefe6366268 /src/AssetManager.cpp
parentIntegrated Optick profiler (diff)
downloadAltCraft-8c5320a94b4c91f2801c05766f6a1747de42a2e5.tar
AltCraft-8c5320a94b4c91f2801c05766f6a1747de42a2e5.tar.gz
AltCraft-8c5320a94b4c91f2801c05766f6a1747de42a2e5.tar.bz2
AltCraft-8c5320a94b4c91f2801c05766f6a1747de42a2e5.tar.lz
AltCraft-8c5320a94b4c91f2801c05766f6a1747de42a2e5.tar.xz
AltCraft-8c5320a94b4c91f2801c05766f6a1747de42a2e5.tar.zst
AltCraft-8c5320a94b4c91f2801c05766f6a1747de42a2e5.zip
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 << "'";
+ }
}
}
}