lib/modules: Change type error to be gramatically nicer

Before:
  <x> is not a integer between 0 and 100 (inclusively).
(notice that “a” is wrong, it should be “an”)
Now:
  <x> 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.
This commit is contained in:
Profpatsch 2017-07-08 14:17:11 +02:00
parent c53d874277
commit af424a607c

View File

@ -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 != [];