aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/fetchMercurial.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-04 21:47:58 +0100
committerGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-04 21:47:58 +0100
commit3a5855353e5dc2986c38bb66eaff5538dea70da1 (patch)
treef21f14e5e959b8ce68cc8045db3e98911587d8fb /src/libexpr/primops/fetchMercurial.cc
parentbe1f0697468bd6c0f2be4f7e058270c161098e9f (diff)
Add detailed error mesage for coerceTo{String,Path}
Diffstat (limited to 'src/libexpr/primops/fetchMercurial.cc')
-rw-r--r--src/libexpr/primops/fetchMercurial.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc
index 199f7508e..dcaf3d362 100644
--- a/src/libexpr/primops/fetchMercurial.cc
+++ b/src/libexpr/primops/fetchMercurial.cc
@@ -22,7 +22,7 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
for (auto & attr : *args[0]->attrs) {
std::string_view n(attr.name);
if (n == "url")
- url = state.coerceToString(*attr.pos, *attr.value, context, false, false).toOwned();
+ url = state.coerceToString(*attr.pos, *attr.value, context, false, false, "While evaluating the `url` attribute passed to builtins.fetchMercurial").toOwned();
else if (n == "rev") {
// Ugly: unlike fetchGit, here the "rev" attribute can
// be both a revision or a branch/tag name.
@@ -48,7 +48,7 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
});
} else
- url = state.coerceToString(pos, *args[0], context, false, false).toOwned();
+ url = state.coerceToString(pos, *args[0], context, false, false, "While evaluating the first argument passed to builtins.fetchMercurial").toOwned();
// FIXME: git externals probably can be used to bypass the URI
// whitelist. Ah well.