Commit c0187962 authored by Alexander Bock's avatar Alexander Bock
Browse files

Catch exception thrown when trying to add an asset that does not exist (closes #1984)

parent 68780a66
Showing with 4 additions and 0 deletions
+4 -0
......@@ -343,6 +343,10 @@ bool AssetManager::loadAsset(Asset* asset, Asset* parent) {
LERROR(fmt::format("Could not load asset {}: {}", asset->path(), e.message));
return false;
}
catch (const ghoul::RuntimeError& e) {
LERRORC(e.component, e.message);
return false;
}
// Extract meta information from the asset file if it was provided
lua_getglobal(*_luaState, AssetGlobalVariableName);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment