Merge remote-tracking branch 'github/develop' into add-error-explanations

This commit is contained in:
Axel Kohlmeyer
2025-01-31 03:23:51 -05:00
236 changed files with 15318 additions and 8091 deletions

View File

@ -263,6 +263,22 @@ void utils::fmtargs_logmesg(LAMMPS *lmp, fmt::string_view format, fmt::format_ar
}
}
/* specialization for the case of just a single string argument */
void utils::print(FILE *fp, const std::string &mesg)
{
fputs(mesg.c_str(), fp);
}
void utils::fmtargs_print(FILE *fp, fmt::string_view format, fmt::format_args args)
{
try {
print(fp, fmt::vformat(format, args));
} catch (fmt::format_error &) {
; // do nothing
}
}
std::string utils::errorurl(int errorcode)
{
return fmt::format("\nFor more information see https://docs.lammps.org/err{:04d}", errorcode);