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/core/StarDirectives.cpp | |
parent | 7783fc7310e53e8f722356935887f1d44406649d (diff) |
More improvements to directives
Error logging is back where it should be
Diffstat (limited to 'source/core/StarDirectives.cpp')
-rw-r--r-- | source/core/StarDirectives.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/core/StarDirectives.cpp b/source/core/StarDirectives.cpp index 9214abf..1245eae 100644 --- a/source/core/StarDirectives.cpp +++ b/source/core/StarDirectives.cpp @@ -56,7 +56,7 @@ void Directives::parse(String const& directives) { ImageOperation operation = imageOperationFromString(str); newList.emplace_back(move(operation), move(str)); } catch (StarException const& e) { - Logger::logf(LogLevel::Error, "Error parsing image operation: %s", e.what()); + newList.emplace_back(ErrorImageOperation{ std::current_exception() }, move(str)); } } } @@ -214,7 +214,10 @@ inline Image DirectivesGroup::applyNewImage(Image const& image) const { void DirectivesGroup::applyExistingImage(Image& image) const { forEach([&](auto const& entry) { - processImageOperation(entry.operation, image); + if (auto error = entry.operation.ptr<ErrorImageOperation>()) + std::rethrow_exception(error->exception); + else + processImageOperation(entry.operation, image); }); } |