diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-05-16 19:08:02 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-05-16 19:08:02 +0200 |
commit | 18a48d80a0686ba81959057e8becc6272acd6c46 (patch) | |
tree | e3f1fabe22a2c2da63c0ea7880cedee6bdb55a87 /src/libexpr/parser.y | |
parent | 1b3a03f1610b714adca41637ccd85a8157e236ab (diff) |
Show function names in error messages
Functions in Nix are anonymous, but if they're assigned to a
variable/attribute, we can use the variable/attribute name in error
messages, e.g.
while evaluating `concatMapStrings' at `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/lib/strings.nix:18:25':
...
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r-- | src/libexpr/parser.y | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index f78780b1d..964527be6 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -104,6 +104,7 @@ static void addAttr(ExprAttrs * attrs, AttrPath & attrPath, } } } + e->setName(attrPath.back()); } |