From 25b021c0cb8f2748d7676a744e82d796d90dfb8e Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 25 Jun 2023 14:00:20 +1000 Subject: More improvements to directives Error logging is back where it should be --- source/core/StarDirectives.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/core/StarDirectives.cpp') 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()) + std::rethrow_exception(error->exception); + else + processImageOperation(entry.operation, image); }); } -- cgit v1.2.3