aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-08 04:53:08 +0100
committereldritch horrors <pennae@lix.systems>2024-03-09 00:05:41 -0700
commit2f7c3fa2516a386af6c556dedc2811edb8302ffc (patch)
tree6d7c1e410520b81836f367b8b3d9153979cf3a72 /src/libexpr
parent87e6ac5eb706593d15d29b070eac5f05e305a787 (diff)
Merge pull request #9818 from Ma27/print-value-on-function-call-type-error
libexpr: print value of what is attempted to be called as function (cherry picked from commit 50e5d7b883042852538371237e32a66bb22f0485) Change-Id: I7cb6290bd8f244e83bfce3b2eed2a4c8b4f16a83
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/eval.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 5e511f49b..6d314463b 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1712,7 +1712,11 @@ void EvalState::callFunction(Value & fun, size_t nrArgs, Value * * args, Value &
}
else
- error("attempt to call something which is not a function but %1%", showType(vCur)).atPos(pos).debugThrow<TypeError>();
+ error("attempt to call something which is not a function but %1%: %2%",
+ showType(vCur),
+ ValuePrinter(*this, vCur, errorPrintOptions))
+ .atPos(pos)
+ .debugThrow<TypeError>();
}
vRes = vCur;