From af424a607cf6888c7e7e2cf718516d0786a2e3d2 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 8 Jul 2017 14:17:11 +0200 Subject: [PATCH] lib/modules: Change type error to be gramatically nicer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: is not a integer between 0 and 100 (inclusively). (notice that β€œa” is wrong, it should be β€œan”) Now: is not of type `integer between 0 and 100 (inclusively)'. This sounds a bit more formal, but circumvents the grammatical problems. Multi-word type descriptions are also easier to see. --- lib/modules.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules.nix b/lib/modules.nix index eb2f89684f3b..8c3584bbbf4c 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -338,7 +338,7 @@ rec { # Type-check the remaining definitions, and merge them. mergedValue = foldl' (res: def: if type.check def.value then res - else throw "The option value `${showOption loc}' in `${def.file}' is not a ${type.description}.") + else throw "The option value `${showOption loc}' in `${def.file}' is not of type `${type.description}'.") (type.merge loc defsFinal) defsFinal; isDefined = defsFinal != [];