lib.generators.toPretty: Add attribute name to error context
This commit is contained in:
parent
5fb20d2f8c
commit
1a44080088
1 changed files with 4 additions and 1 deletions
|
@ -342,7 +342,10 @@ rec {
|
||||||
else "{" + introSpace
|
else "{" + introSpace
|
||||||
+ libStr.concatStringsSep introSpace (libAttr.mapAttrsToList
|
+ libStr.concatStringsSep introSpace (libAttr.mapAttrsToList
|
||||||
(name: value:
|
(name: value:
|
||||||
"${libStr.escapeNixIdentifier name} = ${go (indent + " ") value};") v)
|
"${libStr.escapeNixIdentifier name} = ${
|
||||||
|
builtins.addErrorContext "while evaluating an attribute `${name}`"
|
||||||
|
(go (indent + " ") value)
|
||||||
|
};") v)
|
||||||
+ outroSpace + "}"
|
+ outroSpace + "}"
|
||||||
else abort "generators.toPretty: should never happen (v = ${v})";
|
else abort "generators.toPretty: should never happen (v = ${v})";
|
||||||
in go "";
|
in go "";
|
||||||
|
|
Loading…
Reference in a new issue