improve error message and update unit tests accordingly

This commit is contained in:
Axel Kohlmeyer
2022-08-17 13:25:47 -04:00
parent c8f379dbab
commit c1b664b4be
2 changed files with 5 additions and 5 deletions

View File

@ -777,7 +777,7 @@ std::vector<std::string> utils::gridid_parse(const char *file, int line, const s
auto words = Tokenizer(name, ":").as_vector();
if (words.size() != 3) {
if (error)
error->all(FLERR, "Grid ID {} does not contain two ':' characters", name);
error->all(file, line, "Grid ID {} must be 3 strings separated by 2 ':'characters", name);
else
return {"", "", ""};
}