Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarDirectives.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/StarDirectives.cpp')
-rw-r--r--source/core/StarDirectives.cpp7
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);
});
}