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

@ -274,9 +274,9 @@ void Bond::write_file(int narg, char **arg)
if (utils::file_is_readable(table_file)) {
std::string units = utils::get_potential_units(table_file,"table");
if (!units.empty() && (units != update->unit_style)) {
error->one(FLERR,fmt::format("Trying to append to a table file "
error->one(FLERR,"Trying to append to a table file "
"with UNITS: {} while units are {}",
units, update->unit_style));
units, update->unit_style);
}
std::string date = utils::get_potential_date(table_file,"table");
utils::logmesg(lmp,"Appending to table file {} with "
@ -293,8 +293,8 @@ void Bond::write_file(int narg, char **arg)
datebuf, update->unit_style);
}
if (fp == nullptr)
error->one(FLERR,fmt::format("Cannot open bond_write file {}: {}",
arg[4], utils::getsyserror()));
error->one(FLERR,"Cannot open bond_write file {}: {}",
arg[4], utils::getsyserror());
}
// initialize potentials before evaluating bond potential