| 1090 | |
| 1091 | |
| 1092 | bool Assets::doLoad(AssetId const& id) const { |
| 1093 | try { |
| 1094 | // loadAsset automatically manages the queue and freshens the asset |
| 1095 | // data. |
| 1096 | return (bool)loadAsset(id); |
| 1097 | } catch (std::exception const& e) { |
| 1098 | Logger::error("Exception caught loading asset: {}, {}", id.path, outputException(e, true)); |
| 1099 | } catch (...) { |
| 1100 | Logger::error("Unknown exception caught loading asset: {}", id.path); |
| 1101 | } |
| 1102 | |
| 1103 | // There was an exception, remove the asset from the queue and fill the cache |
| 1104 | // with null so that getAsset will throw. |
| 1105 | m_assetsCache[id] = {}; |
| 1106 | m_assetsDone.broadcast(); |
| 1107 | m_queue.remove(id); |
| 1108 | return true; |
| 1109 | } |
| 1110 | |
| 1111 | bool Assets::doPost(AssetId const& id) const { |
| 1112 | shared_ptr<AssetData> assetData; |
nothing calls this directly
no test coverage detected