Use varargs version of Error:all() and Error::one() where applicable

This commit is contained in:
Axel Kohlmeyer
2021-04-25 21:30:51 -04:00
parent 4cbe6200d6
commit e9e0bb71b6
117 changed files with 522 additions and 524 deletions

View File

@ -62,8 +62,8 @@ PotentialFileReader::PotentialFileReader(LAMMPS *lmp,
try {
reader = open_potential(filename);
if (!reader) {
error->one(FLERR, fmt::format("cannot open {} potential file {}: {}",
potential_name, filename, utils::getsyserror()));
error->one(FLERR, "cannot open {} potential file {}: {}",
potential_name, filename, utils::getsyserror());
}
} catch (FileReaderException &e) {
error->one(FLERR, e.what());
@ -268,9 +268,9 @@ TextFileReader *PotentialFileReader::open_potential(const std::string &path) {
} else if ((units == "real") && (unit_style == "metal") && (unit_convert & utils::REAL2METAL)) {
unit_convert = utils::REAL2METAL;
} else {
lmp->error->one(FLERR, fmt::format("{} file {} requires {} units "
lmp->error->one(FLERR, "{} file {} requires {} units "
"but {} units are in use", filetype,
filename, units, unit_style));
filename, units, unit_style);
}
}
}