From ba9ad29fdbfda3836bb06b35817f08fd10beaa22 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 13 Apr 2017 20:53:23 +0200 Subject: Convert Settings to the new config system This makes all config options self-documenting. Unknown or unparseable config settings and --option flags now cause a warning. --- src/libmain/common-args.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libmain/common-args.cc') diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc index 98693d78a..9a7a89313 100644 --- a/src/libmain/common-args.cc +++ b/src/libmain/common-args.cc @@ -22,7 +22,11 @@ MixCommonArgs::MixCommonArgs(const string & programName) [](Strings ss) { auto name = ss.front(); ss.pop_front(); auto value = ss.front(); - settings.set(name, value); + try { + settings.set(name, value); + } catch (UsageError & e) { + warn(e.what()); + } }); } -- cgit v1.2.3