aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-set.hh
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-06-17 13:18:47 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2020-06-17 13:32:29 -0400
commit7bd88cc1dc746ed2883e1eaebb3230ec2c2bb035 (patch)
tree804e3731a5f6b4a370ac7f79c03c6fa0233ccc79 /src/libexpr/attr-set.hh
parent6438ba1e990ddf76602a70d5c1143b73ed31855c (diff)
parent2f51cd8dc95231b2e2f5b3bd75ac6d8d2dece361 (diff)
Merge remote-tracking branch 'origin/master' into substitute-other-storedir
Diffstat (limited to 'src/libexpr/attr-set.hh')
-rw-r--r--src/libexpr/attr-set.hh6
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;
}