summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Config.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Config.cpp b/src/Config.cpp
index 3312ac81..42b254c1 100644
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -664,7 +664,12 @@ void
Config::update_from_map(const std::unordered_map<std::string, std::string>& map)
{
for (const auto& [key, value] : map) {
- set_item(key, value, std::nullopt, false, "command line");
+ try {
+ set_item(key, value, std::nullopt, false, "command line");
+ } catch (core::Error& e) {
+ throw core::Error(
+ FMT("when parsing command line config \"{}\": {}", key, e.what()));
+ }
}
}