Use varargs version of Error:all() and Error::one() where applicable
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user