add option to suppress printing the last command

This commit is contained in:
Axel Kohlmeyer
2025-01-16 21:11:27 -05:00
parent da5a12fcd1
commit fa54fd1097
5 changed files with 40 additions and 25 deletions

View File

@ -5227,14 +5227,14 @@ void Variable::print_var_error(const std::string &srcfile, const int lineno,
if ((ivar >= 0) && (ivar < nvar)) {
std::string msg = fmt::format("Variable {}: ",names[ivar]) + errmsg;
if (global)
error->all(srcfile,lineno,msg);
error->all(srcfile, lineno, Error::NOLASTLINE, msg);
else
error->one(srcfile,lineno,msg);
error->one(srcfile, lineno, Error::NOLASTLINE, msg);
} else {
if (global)
error->all(srcfile,lineno,errmsg);
error->all(srcfile,lineno, Error::NOLASTLINE, errmsg);
else
error->one(srcfile,lineno,errmsg);
error->one(srcfile,lineno, Error::NOLASTLINE, errmsg);
}
}