diff --git a/src/region_cone.cpp b/src/region_cone.cpp index b838154034..79d22fac39 100644 --- a/src/region_cone.cpp +++ b/src/region_cone.cpp @@ -37,11 +37,13 @@ RegCone::RegCone(LAMMPS *lmp, int narg, char **arg) : // check open face settings - if (openflag && (open_faces[3] || open_faces[4] || open_faces[5])) - error->all(FLERR,"Invalid region cone open setting"); + if (openflag) + for (int i=3; i<6; i++) + if (open_faces[i]) + error->all(FLERR,"Illegal region cone open face: {}", i); - if (strcmp(arg[2],"x") != 0 && strcmp(arg[2],"y") && strcmp(arg[2],"z") != 0) - error->all(FLERR,"Illegal region cylinder command"); + if (strcmp(arg[2],"x") != 0 && strcmp(arg[2],"y") != 0 && strcmp(arg[2],"z") != 0) + error->all(FLERR,"Illegal region cone axis: {}", arg[2]); axis = arg[2][0]; if (axis == 'x') { diff --git a/src/region_intersect.cpp b/src/region_intersect.cpp index 682dd269c0..8d3227ee95 100644 --- a/src/region_intersect.cpp +++ b/src/region_intersect.cpp @@ -27,9 +27,9 @@ RegIntersect::RegIntersect(LAMMPS *lmp, int narg, char **arg) : { nregion = 0; - if (narg < 5) error->all(FLERR, "Illegal region command"); + if (narg < 5) error->all(FLERR, "Illegal region intersect {} arguments 5 expected"); int n = utils::inumeric(FLERR, arg[2], false, lmp); - if (n < 2) error->all(FLERR, "Illegal region command"); + if (n < 2) error->all(FLERR, "Illegal region intersect n: {}", n); options(narg - (n + 3), &arg[n + 3]); // build list of regions to intersect