improve error message
This commit is contained in:
@ -131,7 +131,8 @@ void LabelMap::modify_lmap(int narg, char **arg)
|
|||||||
error->all(FLERR, "Label {} for {} type {} must not start with a number", slabel, tlabel,
|
error->all(FLERR, "Label {} for {} type {} must not start with a number", slabel, tlabel,
|
||||||
itype);
|
itype);
|
||||||
if (search(slabel, (*labels_map)) != -1)
|
if (search(slabel, (*labels_map)) != -1)
|
||||||
error->all(FLERR, "The {} type label {} already exists: type labels must be unique");
|
error->all(FLERR, "The {} type label {} is already in use for type {}", tlabel, slabel,
|
||||||
|
(*labels_map)[slabel]);
|
||||||
std::string &str = (*labels)[itype - 1];
|
std::string &str = (*labels)[itype - 1];
|
||||||
if (!str.empty()) (*labels_map).erase(str);
|
if (!str.empty()) (*labels_map).erase(str);
|
||||||
str = slabel;
|
str = slabel;
|
||||||
|
|||||||
Reference in New Issue
Block a user