diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-17 04:55:47 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-17 04:58:43 +0000 |
commit | 517f5980e2c63af47e7042873cc33b521918ad35 (patch) | |
tree | 19438d2e71fdf45e5af07cdd081477e5e89d6df1 /src/libexpr/attr-set.hh | |
parent | e5cc1ebc5db1ef837da82f5ce7824bb29cbcc44b (diff) | |
parent | 29542865cee37ab22efe1bd142900b69f6c59f0d (diff) |
Merge remote-tracking branch 'upstream/master' into no-stringly-typed-derivation-output
Diffstat (limited to 'src/libexpr/attr-set.hh')
-rw-r--r-- | src/libexpr/attr-set.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libexpr/attr-set.hh b/src/libexpr/attr-set.hh index 118c7bd5d..c601d09c2 100644 --- a/src/libexpr/attr-set.hh +++ b/src/libexpr/attr-set.hh @@ -76,7 +76,11 @@ public: { auto a = get(name); if (!a) - throw Error("attribute '%s' missing, at %s", name, pos); + throw Error({ + .hint = hintfmt("attribute '%s' missing", name), + .nixCode = NixCode { .errPos = pos } + }); + return *a; } |