From 01698ddc2ee952328c4e6318c62cd95038abe820 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Mar 2025 17:06:37 -0400 Subject: [PATCH] improve error messages for easier debugging --- src/SPIN/fix_nve_spin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SPIN/fix_nve_spin.cpp b/src/SPIN/fix_nve_spin.cpp index 1a08e2cf00..89a77b31ce 100644 --- a/src/SPIN/fix_nve_spin.cpp +++ b/src/SPIN/fix_nve_spin.cpp @@ -584,7 +584,8 @@ void FixNVESpin::sectoring() } 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 ray = rsy/rv; @@ -600,7 +601,8 @@ void FixNVESpin::sectoring() nsectors = sec[0]*sec[1]*sec[2]; 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[1] = rsy;