1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-01 16:41:47 +02:00

add pos to errorinfo, remove from hints

This commit is contained in:
Ben Burdette 2020-05-08 18:18:28 -06:00
parent 1b801cec40
commit 55eb717148
13 changed files with 507 additions and 194 deletions

View file

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