aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/fetchGit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/primops/fetchGit.cc')
-rw-r--r--src/libexpr/primops/fetchGit.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libexpr/primops/fetchGit.cc b/src/libexpr/primops/fetchGit.cc
index 480cc1adc..68ffed513 100644
--- a/src/libexpr/primops/fetchGit.cc
+++ b/src/libexpr/primops/fetchGit.cc
@@ -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);