1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Get rid of explicit ErrorInfo constructors

This commit is contained in:
Eelco Dolstra 2020-06-15 14:06:58 +02:00
parent fd64e4fb96
commit 1fb762d11f
19 changed files with 360 additions and 447 deletions

View file

@ -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;
}