From f7cea5e428fb76dfcca2a140e2a736fc51e19a71 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 2 Jan 2025 19:38:10 -0500 Subject: [PATCH] improve error messages --- src/update.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/update.cpp b/src/update.cpp index 08f9147b5d..4140a31731 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -308,7 +308,7 @@ void Update::set_units(const char *style) neighbor->skin = 0.1; } else - error->all(FLERR, "Illegal units command"); + error->all(FLERR, "Unknown units style {}", style); delete[] unit_style; unit_style = utils::strdup(style); @@ -325,7 +325,7 @@ void Update::set_units(const char *style) void Update::create_integrate(int narg, char **arg, int trysuffix) { - if (narg < 1) error->all(FLERR, "Illegal run_style command"); + if (narg < 1) utils::missing_cmd_args(FLERR, "run_style", error); delete[] integrate_style; delete integrate; @@ -390,14 +390,14 @@ void Update::new_integrate(char *style, int narg, char **arg, int trysuffix, int return; } - error->all(FLERR, "Illegal integrate style"); + error->all(FLERR, "Unknown integrate style {}", style); } /* ---------------------------------------------------------------------- */ void Update::create_minimize(int narg, char **arg, int trysuffix) { - if (narg < 1) error->all(FLERR, "Illegal minimize_style command"); + if (narg < 1) utils::missing_cmd_args(FLERR, "minimize_style", error); delete[] minimize_style; delete minimize; @@ -457,7 +457,7 @@ void Update::new_minimize(char *style, int /* narg */, char ** /* arg */, int tr return; } - error->all(FLERR, "Illegal minimize style"); + error->all(FLERR, "Unknown minimize style {}", style); } /* ----------------------------------------------------------------------