improve error messages

This commit is contained in:
Axel Kohlmeyer
2022-09-11 21:53:14 -04:00
parent c235cbee71
commit 34714dba29
4 changed files with 19 additions and 12 deletions

View File

@ -41,7 +41,7 @@ void WriteCoeff::command(int narg, char **arg)
if (domain->box_exist == 0)
error->all(FLERR, "Write_coeff command before simulation box is defined");
if (narg != 1) error->all(FLERR, "Illegal write_coeff command");
if (narg != 1) utils::missing_cmd_args(FLERR, "write_coeff", error);
char *file = utils::strdup(fmt::format("{}.tmp", arg[0]));
@ -167,6 +167,5 @@ void WriteCoeff::command(int narg, char **arg)
fclose(two);
platform::unlink(file);
}
delete[] file;
}