aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/context.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/context.cc
parentbe1f0697468bd6c0f2be4f7e058270c161098e9f (diff)
Add detailed error mesage for coerceTo{String,Path}
Diffstat (limited to 'src/libexpr/primops/context.cc')
-rw-r--r--src/libexpr/primops/context.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops/context.cc b/src/libexpr/primops/context.cc
index f1feb4dc6..78320dc09 100644
--- a/src/libexpr/primops/context.cc
+++ b/src/libexpr/primops/context.cc
@@ -7,7 +7,7 @@ namespace nix {
static void prim_unsafeDiscardStringContext(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
PathSet context;
- auto s = state.coerceToString(pos, *args[0], context);
+ auto s = state.coerceToString(pos, *args[0], context, "While evaluating the argument passed to builtins.unsafeDiscardStringContext");
v.mkString(*s);
}
@@ -33,7 +33,7 @@ static RegisterPrimOp primop_hasContext("__hasContext", 1, prim_hasContext);
static void prim_unsafeDiscardOutputDependency(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
PathSet context;
- auto s = state.coerceToString(pos, *args[0], context);
+ auto s = state.coerceToString(pos, *args[0], context, "While evaluating the argument passed to builtins.unsafeDiscardOutputDependency");
PathSet context2;
for (auto & p : context)