Merge pull request #7258 from ncfavier/fix-eval-error-fmt

Fix printing of eval errors with two format placeholders
This commit is contained in:
Théophane Hufschmitt 2022-11-10 18:41:16 +01:00 committed by GitHub
commit 9550b1d519
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -904,7 +904,7 @@ void EvalState::throwEvalError(const char * s, const std::string & s2,
const std::string & s3)
{
debugThrowLastTrace(EvalError({
.msg = hintfmt(s, s2),
.msg = hintfmt(s, s2, s3),
.errPos = positions[noPos]
}));
}
@ -913,7 +913,7 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::stri
const std::string & s3)
{
debugThrowLastTrace(EvalError({
.msg = hintfmt(s, s2),
.msg = hintfmt(s, s2, s3),
.errPos = positions[pos]
}));
}
@ -922,7 +922,7 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::stri
const std::string & s3, Env & env, Expr & expr)
{
debugThrow(EvalError({
.msg = hintfmt(s, s2),
.msg = hintfmt(s, s2, s3),
.errPos = positions[pos]
}), env, expr);
}