diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-25 14:00:20 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-25 14:00:20 +1000 |
commit | 25b021c0cb8f2748d7676a744e82d796d90dfb8e (patch) | |
tree | a5b06a1eedbb9854b92daae406cd6e652df509a8 /source/base/StarAssets.cpp | |
parent | 7783fc7310e53e8f722356935887f1d44406649d (diff) |
More improvements to directives
Error logging is back where it should be
Diffstat (limited to 'source/base/StarAssets.cpp')
-rw-r--r-- | source/base/StarAssets.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/base/StarAssets.cpp b/source/base/StarAssets.cpp index e5313ea..ae2d087 100644 --- a/source/base/StarAssets.cpp +++ b/source/base/StarAssets.cpp @@ -862,7 +862,10 @@ shared_ptr<Assets::AssetData> Assets::loadImage(AssetPath const& path) const { auto newData = make_shared<ImageData>(); Image newImage = *source->image; path.directives.forEach([&](auto const& entry) { - processImageOperation(entry.operation, newImage, [&](String const& ref) { return references.get(ref).get(); }); + if (auto error = entry.operation.ptr<ErrorImageOperation>()) + std::rethrow_exception(error->exception); + else + processImageOperation(entry.operation, newImage, [&](String const& ref) { return references.get(ref).get(); }); }); newData->image = make_shared<Image>(move(newImage)); return newData; |