mirror of
https://github.com/NixOS/nix
synced 2025-06-30 07:33:16 +02:00
add pos to errorinfo, remove from hints
This commit is contained in:
parent
1b801cec40
commit
55eb717148
13 changed files with 507 additions and 194 deletions
|
@ -217,11 +217,19 @@ static void prim_fetchGit(EvalState & state, const Pos & pos, Value * * args, Va
|
|||
else if (n == "name")
|
||||
name = state.forceStringNoCtx(*attr.value, *attr.pos);
|
||||
else
|
||||
throw EvalError("unsupported argument '%s' to 'fetchGit', at %s", attr.name, *attr.pos);
|
||||
throw EvalError(
|
||||
ErrorInfo {
|
||||
.hint = hintfmt("unsupported argument '%s' to 'fetchGit'", attr.name),
|
||||
.nixCode = NixCode { .errPos = *attr.pos }
|
||||
});
|
||||
}
|
||||
|
||||
if (url.empty())
|
||||
throw EvalError("'url' argument required, at %1%", pos);
|
||||
throw EvalError(
|
||||
ErrorInfo {
|
||||
.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