1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 00:11:17 +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

@ -268,11 +268,10 @@ void ExprVar::bindVars(const StaticEnv & env)
enclosing `with'. If there is no `with', then we can issue an
"undefined variable" error now. */
if (withLevel == -1)
throw UndefinedVarError(
ErrorInfo {
.hint = hintfmt("undefined variable '%1%'", name),
.nixCode = NixCode { .errPos = pos }
});
throw UndefinedVarError({
.hint = hintfmt("undefined variable '%1%'", name),
.nixCode = NixCode { .errPos = pos }
});
fromWith = true;
this->level = withLevel;
}