mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Get rid of explicit ErrorInfo constructors
This commit is contained in:
parent
fd64e4fb96
commit
1fb762d11f
19 changed files with 360 additions and 447 deletions
|
@ -38,19 +38,17 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
|
|||
else if (n == "name")
|
||||
name = state.forceStringNoCtx(*attr.value, *attr.pos);
|
||||
else
|
||||
throw EvalError(
|
||||
ErrorInfo {
|
||||
.hint = hintfmt("unsupported argument '%s' to 'fetchMercurial'", attr.name),
|
||||
.nixCode = NixCode { .errPos = *attr.pos }
|
||||
});
|
||||
throw EvalError({
|
||||
.hint = hintfmt("unsupported argument '%s' to 'fetchMercurial'", attr.name),
|
||||
.nixCode = NixCode { .errPos = *attr.pos }
|
||||
});
|
||||
}
|
||||
|
||||
if (url.empty())
|
||||
throw EvalError(
|
||||
ErrorInfo {
|
||||
.hint = hintfmt("'url' argument required"),
|
||||
.nixCode = NixCode { .errPos = pos }
|
||||
});
|
||||
throw EvalError({
|
||||
.hint = hintfmt("'url' argument required"),
|
||||
.nixCode = NixCode { .errPos = pos }
|
||||
});
|
||||
|
||||
} else
|
||||
url = state.coerceToString(pos, *args[0], context, false, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue