diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-05-08 18:18:28 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-05-08 18:18:28 -0600 |
commit | 55eb71714854b262b5e1079ff250a13cc0bbf644 (patch) | |
tree | 576767e919ac461b15ce11671a285d3933e15129 /src/libexpr/attr-set.hh | |
parent | 1b801cec407454b904466153dfc56cec6b433f4b (diff) |
add pos to errorinfo, remove from hints
Diffstat (limited to 'src/libexpr/attr-set.hh')
-rw-r--r-- | src/libexpr/attr-set.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libexpr/attr-set.hh b/src/libexpr/attr-set.hh index 118c7bd5d..f5651891f 100644 --- a/src/libexpr/attr-set.hh +++ b/src/libexpr/attr-set.hh @@ -76,7 +76,12 @@ public: { auto a = get(name); if (!a) - throw Error("attribute '%s' missing, at %s", name, pos); + throw Error( + ErrorInfo { + .hint = hintfmt("attribute '%s' missing", name), + .nixCode = NixCode { .errPos = pos } + }); + return *a; } |