From 1fb762d11fadc659ef41b79eaddddcce5fbbc192 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 15 Jun 2020 14:06:58 +0200 Subject: Get rid of explicit ErrorInfo constructors --- src/libexpr/attr-set.hh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/libexpr/attr-set.hh') 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; } -- cgit v1.2.3