diff options
author | Profpatsch <mail@profpatsch.de> | 2017-07-08 14:17:11 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2017-11-05 15:56:32 +0100 |
commit | af424a607cf6888c7e7e2cf718516d0786a2e3d2 (patch) | |
tree | 96d2755be4594cf5f00aeee8e7b242eb0380c44f /lib/modules.nix | |
parent | c53d874277c0eaf88ec71bab9658425535a2252a (diff) |
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.
Diffstat (limited to 'lib/modules.nix')
-rw-r--r-- | lib/modules.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index eb2f89684f3..8c3584bbbf4 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 != []; |