mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update assets errors handling & add 'atlases' to preload
This commit is contained in:
parent
ed60bdc333
commit
f9df873382
7 changed files with 112 additions and 51 deletions
|
|
@ -256,11 +256,13 @@ void Engine::loadAssets() {
|
|||
auto task = loader.startTask([=](){});
|
||||
task->waitForEnd();
|
||||
} else {
|
||||
while (loader.hasNext()) {
|
||||
if (!loader.loadNext()) {
|
||||
new_assets.reset();
|
||||
throw std::runtime_error("could not to load assets");
|
||||
try {
|
||||
while (loader.hasNext()) {
|
||||
loader.loadNext();
|
||||
}
|
||||
} catch (const assetload::error& err) {
|
||||
new_assets.reset();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
assets = std::move(new_assets);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue