Use varargs version of Error:all() and Error::one() where applicable
This commit is contained in:
@ -1729,9 +1729,9 @@ void Pair::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 DATE: {}\n",
|
||||
@ -1748,8 +1748,8 @@ void Pair::write_file(int narg, char **arg)
|
||||
datebuf, update->unit_style);
|
||||
}
|
||||
if (fp == nullptr)
|
||||
error->one(FLERR,fmt::format("Cannot open pair_write file {}: {}",
|
||||
table_file, utils::getsyserror()));
|
||||
error->one(FLERR,"Cannot open pair_write file {}: {}",
|
||||
table_file, utils::getsyserror());
|
||||
fprintf(fp,"# Pair potential %s for atom types %d %d: i,r,energy,force\n",
|
||||
force->pair_style,itype,jtype);
|
||||
if (style == RLINEAR)
|
||||
|
||||
Reference in New Issue
Block a user