From 0adf77e2eeb5227666f54ac6476884f9ddb63bee Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 11:38:29 -0700 Subject: [PATCH] =?UTF-8?q?Narrow=20the=20=C2=ABnot=20defined=C2=BB=20chec?= =?UTF-8?q?k=20to=20just=20ThrownError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 5886ee6959b..1fde8986fdf 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -352,7 +352,7 @@ void printValue(Context * ctx, Out & out, std::variantstate->forceValueDeep(v); out << v; } - } catch (Error & e) { + } catch (ThrownError & e) { if (e.msg() == "The option `" + path + "' is used but not defined.") { // 93% of errors are this, and just letting this message through would be // misleading. These values may or may not actually be "used" in the @@ -365,6 +365,8 @@ void printValue(Context * ctx, Out & out, std::variant