improve error message

This commit is contained in:
Axel Kohlmeyer
2024-09-16 20:38:50 -04:00
parent 80cd9ace57
commit 804aa4ee85
2 changed files with 2 additions and 2 deletions

View File

@ -613,7 +613,7 @@ void Variable::set(int narg, char **arg)
// unrecognized variable style
} else error->all(FLERR,"Unknown variable keyword: {}", arg[1]);
} else error->all(FLERR,"Unknown variable style: {}", arg[1]);
// set name of variable, if not replacing one flagged with replaceflag
// name must be all alphanumeric chars or underscores

View File

@ -206,7 +206,7 @@ TEST_F(VariableTest, CreateDelete)
TEST_FAILURE(".*ERROR: Invalid variable loop argument: -1.*",
command("variable dummy loop -1"););
TEST_FAILURE(".*ERROR: Illegal variable loop command.*", command("variable dummy loop 10 1"););
TEST_FAILURE(".*ERROR: Unknown variable keyword: xxx.*", command("variable dummy xxxx"););
TEST_FAILURE(".*ERROR: Unknown variable style: xxx.*", command("variable dummy xxxx"););
TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*",
command("variable two string xxx"););
TEST_FAILURE(".*ERROR: Cannot redefine variable as a different style.*",