aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-set.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-15 14:06:58 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-15 14:06:58 +0200
commit1fb762d11fadc659ef41b79eaddddcce5fbbc192 (patch)
treee47612705a9af354ab5bdca7864d70b1158ace12 /src/libexpr/attr-set.hh
parentfd64e4fb96f814440dc337ce664cdbd22e0eabb2 (diff)
Get rid of explicit ErrorInfo constructors
Diffstat (limited to 'src/libexpr/attr-set.hh')
-rw-r--r--src/libexpr/attr-set.hh9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libexpr/attr-set.hh b/src/libexpr/attr-set.hh
index f5651891f..c601d09c2 100644
--- a/src/libexpr/attr-set.hh
+++ b/src/libexpr/attr-set.hh
@@ -76,11 +76,10 @@ public:
{
auto a = get(name);
if (!a)
- throw Error(
- ErrorInfo {
- .hint = hintfmt("attribute '%s' missing", name),
- .nixCode = NixCode { .errPos = pos }
- });
+ throw Error({
+ .hint = hintfmt("attribute '%s' missing", name),
+ .nixCode = NixCode { .errPos = pos }
+ });
return *a;
}