about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--yants.nix3
-rw-r--r--z-structs.pngbin67989 -> 69499 bytes
2 files changed, 2 insertions, 1 deletions
diff --git a/yants.nix b/yants.nix
index 3dfebfcf1fa0..a00d084392d3 100644
--- a/yants.nix
+++ b/yants.nix
@@ -35,7 +35,8 @@ with builtins; let
       type = def."${field}";
       checked = type.check fieldVal;
   in if checked then (current && true)
-     else (throw "Field ${field} is of type ${typeOf fieldVal}, but expected ${type.name}");
+     else if isNull fieldVal then (throw "Missing required ${type.name} field '${field}'")
+          else  (throw "Field ${field} is of type ${typeOf fieldVal}, but expected ${type.name}");
 
   checkExtraneous = name: def: present:
   if (length present) == 0 then true
diff --git a/z-structs.png b/z-structs.png
index f46e15ade5b2..fcbcf6415fad 100644
--- a/z-structs.png
+++ b/z-structs.png
Binary files differ