improve error messages

This commit is contained in:
Axel Kohlmeyer
2022-11-30 08:09:12 -05:00
parent 80e6575784
commit 5f3b719a7d
2 changed files with 10 additions and 11 deletions

View File

@ -1718,7 +1718,7 @@ void Input::pair_coeff()
if (force->pair == nullptr) error->all(FLERR,"Pair_coeff command without a pair style");
if (narg < 2) utils::missing_cmd_args(FLERR,"pair_coeff", error);
if (force->pair->one_coeff && ((strcmp(arg[0],"*") != 0) || (strcmp(arg[1],"*") != 0)))
error->all(FLERR,"Pair_coeff must start with * * for this pair style");
error->all(FLERR,"Pair_coeff must start with * * for pair style {}", force->pair_style);
char *newarg0 = utils::expand_type(FLERR, arg[0], Atom::ATOM, lmp);
if (newarg0) arg[0] = newarg0;