aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libexpr/primops.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 428adf4c2..1b9948eaf 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -1210,7 +1210,10 @@ static RegisterPrimOp primop_toPath({
static void prim_storePath(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
if (evalSettings.pureEval)
- throw EvalError("builtins.storePath' is not allowed in pure evaluation mode");
+ throw EvalError({
+ .msg = hintfmt("'%s' is not allowed in pure evaluation mode", "builtins.storePath"),
+ .errPos = pos
+ });
PathSet context;
Path path = state.checkSourcePath(state.coerceToPath(pos, *args[0], context));