improve error messages for easier debugging

This commit is contained in:
Axel Kohlmeyer
2025-03-10 17:06:37 -04:00
parent 08f8be18e5
commit 01698ddc2e

View File

@ -584,7 +584,8 @@ void FixNVESpin::sectoring()
} }
if (rv == 0.0) if (rv == 0.0)
error->all(FLERR,"Illegal sectoring operation"); error->all(FLERR, Error::NOLASTLINE,
"No suitable cutoff found for sectoring operation: rv = {}", rv);
double rax = rsx/rv; double rax = rsx/rv;
double ray = rsy/rv; double ray = rsy/rv;
@ -600,7 +601,8 @@ void FixNVESpin::sectoring()
nsectors = sec[0]*sec[1]*sec[2]; nsectors = sec[0]*sec[1]*sec[2];
if (sector_flag && (nsectors != 8)) if (sector_flag && (nsectors != 8))
error->all(FLERR,"Illegal sectoring operation"); error->all(FLERR, Error::NOLASTLINE,
"Illegal sectoring operation resulting in {} sectors instead of 8", nsectors);
rsec[0] = rsx; rsec[0] = rsx;
rsec[1] = rsy; rsec[1] = rsy;