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
This commit is contained in:
eldritch horrors
2024-03-09 00:05:41 -07:00
parent 87e6ac5eb7
commit 2f7c3fa251
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -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;