From b936673935688a6744611dcfca3e2da049bea446 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 19 Mar 2025 02:23:10 -0400 Subject: [PATCH] consolidate calls to utils::errorurl() with corresponding error class calls. --- doc/src/Errors_details.rst | 4 ++-- src/GPU/pppm_gpu.cpp | 2 +- src/INTEL/pppm_disp_intel.cpp | 2 +- src/INTEL/pppm_intel.cpp | 2 +- src/KOKKOS/fix_shake_kokkos.cpp | 4 ++-- src/KOKKOS/pppm_kokkos.cpp | 2 +- src/KSPACE/msm.cpp | 4 ++-- src/KSPACE/msm_cg.cpp | 2 +- src/KSPACE/pppm.cpp | 2 +- src/KSPACE/pppm_cg.cpp | 2 +- src/KSPACE/pppm_disp.cpp | 2 +- src/KSPACE/pppm_disp_tip4p.cpp | 2 +- src/KSPACE/pppm_stagger.cpp | 2 +- src/KSPACE/pppm_tip4p.cpp | 2 +- src/OPENMP/msm_cg_omp.cpp | 4 ++-- src/OPENMP/pppm_disp_omp.cpp | 4 ++-- src/OPENMP/pppm_disp_tip4p_omp.cpp | 8 ++++++-- src/OPENMP/pppm_tip4p_omp.cpp | 2 +- src/RIGID/fix_shake.cpp | 16 ++++++++-------- src/balance.cpp | 4 ++-- src/change_box.cpp | 4 ++-- src/compute_pressure.cpp | 24 +++++++++++++++--------- src/displace_atoms.cpp | 4 ++-- src/variable.cpp | 6 +++--- 24 files changed, 60 insertions(+), 50 deletions(-) diff --git a/doc/src/Errors_details.rst b/doc/src/Errors_details.rst index 6daf14f91a..72148c2626 100644 --- a/doc/src/Errors_details.rst +++ b/doc/src/Errors_details.rst @@ -347,8 +347,8 @@ long-range solver. .. _err0005: -Bond (or angle, dihedral, or improper) atoms missing ----------------------------------------------------- +Bond (or angle, dihedral, improper, cmap, or shake) atoms missing +----------------------------------------------------------------- The second atom needed to compute a particular bond (or the third or fourth atom for angle, dihedral, or improper) is missing on the indicated timestep diff --git a/src/GPU/pppm_gpu.cpp b/src/GPU/pppm_gpu.cpp index 593aed827c..47fe71e872 100644 --- a/src/GPU/pppm_gpu.cpp +++ b/src/GPU/pppm_gpu.cpp @@ -197,7 +197,7 @@ void PPPMGPU::compute(int eflag, int vflag) if (!success) error->one(FLERR,"Insufficient memory on accelerator"); if (flag != 0) - error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } // convert atoms from box to lamda coords diff --git a/src/INTEL/pppm_disp_intel.cpp b/src/INTEL/pppm_disp_intel.cpp index 8816ed553b..3af670d325 100644 --- a/src/INTEL/pppm_disp_intel.cpp +++ b/src/INTEL/pppm_disp_intel.cpp @@ -777,7 +777,7 @@ void PPPMDispIntel::particle_map_intel(double delx, double dely, double delz, } } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPMDisp" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPMDisp" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/INTEL/pppm_intel.cpp b/src/INTEL/pppm_intel.cpp index 8b75b86e07..1ebfc29b99 100644 --- a/src/INTEL/pppm_intel.cpp +++ b/src/INTEL/pppm_intel.cpp @@ -404,7 +404,7 @@ void PPPMIntel::particle_map(IntelBuffers *buffers) } } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 52826d7b04..05873120d7 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -257,8 +257,8 @@ void FixShakeKokkos::pre_neighbor() nlist = h_nlist(); if (h_error_flag() == 1) { - error->one(FLERR,"Shake atoms missing on proc " - "{} at step {}",comm->me,update->ntimestep); + error->one(FLERR,"Shake atoms missing on proc {} at step {}{}", + comm->me,update->ntimestep, utils::errorurl(5)); } } diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 40faaed8d5..84bff03c80 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -1147,7 +1147,7 @@ void PPPMKokkos::particle_map() k_flag.template modify(); k_flag.template sync(); if (k_flag.h_view()) - error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } template diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index c4008967f8..2cdeb74ec0 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -1466,8 +1466,8 @@ void MSM::particle_map() } if (flag) - error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute MSM{}", - utils::errorurl(4)); + error->one(FLERR, Error::NOLASTLINE, + "Out of range atoms - cannot compute MSM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/msm_cg.cpp b/src/KSPACE/msm_cg.cpp index 62e23c564c..9ba52a68d5 100644 --- a/src/KSPACE/msm_cg.cpp +++ b/src/KSPACE/msm_cg.cpp @@ -335,7 +335,7 @@ void MSMCG::particle_map() flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute MSM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute MSM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index aeaf53f4e1..8eaa60ac92 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -1830,7 +1830,7 @@ void PPPM::particle_map() flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_cg.cpp b/src/KSPACE/pppm_cg.cpp index 5f474efd54..fe0176bf13 100644 --- a/src/KSPACE/pppm_cg.cpp +++ b/src/KSPACE/pppm_cg.cpp @@ -304,7 +304,7 @@ void PPPMCG::particle_map() flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 1e6aec5029..f2882582bb 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -4252,7 +4252,7 @@ void PPPMDisp::particle_map(double delx, double dely, double delz, flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPMDisp" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPMDisp" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_disp_tip4p.cpp b/src/KSPACE/pppm_disp_tip4p.cpp index 1542304e35..1417aca4a3 100644 --- a/src/KSPACE/pppm_disp_tip4p.cpp +++ b/src/KSPACE/pppm_disp_tip4p.cpp @@ -100,7 +100,7 @@ void PPPMDispTIP4P::particle_map_c(double delx, double dely, double delz, flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_stagger.cpp b/src/KSPACE/pppm_stagger.cpp index 4a1946e32b..9681351ec1 100644 --- a/src/KSPACE/pppm_stagger.cpp +++ b/src/KSPACE/pppm_stagger.cpp @@ -699,7 +699,7 @@ void PPPMStagger::particle_map() flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index d1e723a60f..631eebc65c 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -98,7 +98,7 @@ void PPPMTIP4P::particle_map() int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag_all) error->all(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/msm_cg_omp.cpp b/src/OPENMP/msm_cg_omp.cpp index 48ce876e1e..008d27f99a 100644 --- a/src/OPENMP/msm_cg_omp.cpp +++ b/src/OPENMP/msm_cg_omp.cpp @@ -357,8 +357,8 @@ void MSMCGOMP::particle_map() } if (flag) - error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute MSM{}", - utils::errorurl(4)); + error->one(FLERR, Error::NOLASTLINE, + "Out of range atoms - cannot compute MSM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/pppm_disp_omp.cpp b/src/OPENMP/pppm_disp_omp.cpp index 6fceca6a14..e7f8d1c360 100644 --- a/src/OPENMP/pppm_disp_omp.cpp +++ b/src/OPENMP/pppm_disp_omp.cpp @@ -358,7 +358,7 @@ void PPPMDispOMP::particle_map(double dxinv, double dyinv, const int nzhi_out = nzhi_o; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions. Simulation unstable."); + error->one(FLERR,"Non-numeric box dimensions. Simulation unstable."+utils::errorurl(6)); int flag = 0; #if defined(_OPENMP) @@ -388,7 +388,7 @@ void PPPMDispOMP::particle_map(double dxinv, double dyinv, int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag_all) error->all(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/pppm_disp_tip4p_omp.cpp b/src/OPENMP/pppm_disp_tip4p_omp.cpp index a62e1cb6f3..7cadbbb2ac 100644 --- a/src/OPENMP/pppm_disp_tip4p_omp.cpp +++ b/src/OPENMP/pppm_disp_tip4p_omp.cpp @@ -392,7 +392,9 @@ void PPPMDispTIP4POMP::particle_map_c(double dxinv, double dyinv, int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag_all) + error->all(FLERR, Error::NOLASTLINE, + "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- @@ -460,7 +462,9 @@ void PPPMDispTIP4POMP::particle_map(double dxinv, double dyinv, int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM"); + if (flag_all) + error->all(FLERR, Error::NOLASTLINE, + "Out of range atoms - cannot compute PPPM", utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/pppm_tip4p_omp.cpp b/src/OPENMP/pppm_tip4p_omp.cpp index 167c722a0e..e2cf98b0d2 100644 --- a/src/OPENMP/pppm_tip4p_omp.cpp +++ b/src/OPENMP/pppm_tip4p_omp.cpp @@ -388,7 +388,7 @@ void PPPMTIP4POMP::particle_map() int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag_all) error->all(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 41708823bb..89b8ffd942 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -596,8 +596,8 @@ void FixShake::pre_neighbor() atom1 = atom->map(shake_atom[i][0]); atom2 = atom->map(shake_atom[i][1]); if (atom1 == -1 || atom2 == -1) - error->one(FLERR,"Shake atoms {} {} missing on proc {} at step {}",shake_atom[i][0], - shake_atom[i][1],comm->me,update->ntimestep); + error->one(FLERR,"Shake atoms {} {} missing on proc {} at step {}{}",shake_atom[i][0], + shake_atom[i][1],comm->me,update->ntimestep,utils::errorurl(5)); atom1 = domain->closest_image(i, atom1); atom2 = domain->closest_image(i, atom2); if (i <= atom1 && i <= atom2) { @@ -611,9 +611,9 @@ void FixShake::pre_neighbor() atom2 = atom->map(shake_atom[i][1]); atom3 = atom->map(shake_atom[i][2]); if (atom1 == -1 || atom2 == -1 || atom3 == -1) - error->one(FLERR,"Shake atoms {} {} {} missing on proc {} at step {}",shake_atom[i][0], - shake_atom[i][1],shake_atom[i][2], - comm->me,update->ntimestep); + error->one(FLERR,"Shake atoms {} {} {} missing on proc {} at step {}{}",shake_atom[i][0], + shake_atom[i][1],shake_atom[i][2],comm->me,update->ntimestep, + utils::errorurl(5)); atom1 = domain->closest_image(i, atom1); atom2 = domain->closest_image(i, atom2); atom3 = domain->closest_image(i, atom3); @@ -630,9 +630,9 @@ void FixShake::pre_neighbor() atom3 = atom->map(shake_atom[i][2]); atom4 = atom->map(shake_atom[i][3]); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) - error->one(FLERR,"Shake atoms {} {} {} {} missing on proc {} at step {}",shake_atom[i][0], - shake_atom[i][1],shake_atom[i][2], - shake_atom[i][3],comm->me,update->ntimestep); + error->one(FLERR,"Shake atoms {} {} {} {} missing on proc {} at step {}{}", + shake_atom[i][0],shake_atom[i][1],shake_atom[i][2],shake_atom[i][3], + comm->me,update->ntimestep,utils::errorurl(5)); atom1 = domain->closest_image(i, atom1); atom2 = domain->closest_image(i, atom2); atom3 = domain->closest_image(i, atom3); diff --git a/src/balance.cpp b/src/balance.cpp index 3e45efed49..5ebe242bfb 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -377,8 +377,8 @@ void Balance::command(int narg, char **arg) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms) - error->all(FLERR,"Lost atoms via balance: original {} current {}"+utils::errorurl(8), - atom->natoms,natoms); + error->all(FLERR,Error::NOLASTLINE,"Lost atoms via balance: original {} current {}" + +utils::errorurl(8),atom->natoms,natoms); // imbfinal = final imbalance // set disable = 1, so weights no longer migrate with atoms diff --git a/src/change_box.cpp b/src/change_box.cpp index dd6c427a18..5223218f3d 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -380,8 +380,8 @@ void ChangeBox::command(int narg, char **arg) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms && comm->me == 0) - error->warning(FLERR,"Lost atoms via change_box: original {} " - "current {}"+utils::errorurl(8),atom->natoms,natoms); + error->warning(FLERR,"Lost atoms via change_box: original {} current {}"+utils::errorurl(8), + atom->natoms,natoms); } /* ---------------------------------------------------------------------- diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index 91a9cb531d..7843caecba 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -92,7 +92,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : nsub = utils::inumeric(FLERR,arg[iarg],false,lmp); ++iarg; if (nsub <= 0) - error->all(FLERR,"Illegal compute pressure command"); + error->all(FLERR, iarg, "Illegal compute pressure hybrid sub-style index {}", nsub); } } @@ -105,7 +105,8 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : } if (!pairhybrid) - error->all(FLERR,"Unrecognized pair style in compute pressure command"); + error->all(FLERR, iarg - (nsub ? 1 : 0), + "Unrecognized pair style {} in compute pressure command", pstyle); pairhybridflag = 1; } @@ -120,7 +121,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : pairflag = 1; bondflag = angleflag = dihedralflag = improperflag = 1; kspaceflag = fixflag = 1; - } else error->all(FLERR,"Illegal compute pressure command"); + } else error->all(FLERR, iarg, "Unknown compute pressure keyword {}", arg[iarg]); iarg++; } } @@ -128,7 +129,8 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : // error check if (keflag && id_temp == nullptr) - error->all(FLERR,"Compute pressure requires temperature ID to include kinetic energy"); + error->all(FLERR, Error::NOLASTLINE, + "Compute pressure requires temperature ID to include kinetic energy"); vector = new double[size_vector]; nvirial = 0; @@ -164,7 +166,8 @@ void ComputePressure::init() if (keflag) { temperature = modify->get_compute_by_id(id_temp); if (!temperature) - error->all(FLERR,"Could not find compute pressure temperature ID {}", id_temp); + error->all(FLERR, Error::NOLASTLINE, + "Could not find compute pressure temperature ID {}", id_temp); } // recheck if pair style with and without suffix exists @@ -178,7 +181,8 @@ void ComputePressure::init() } if (!pairhybrid) - error->all(FLERR,"Unrecognized pair style in compute pressure command"); + error->all(FLERR, Error::NOLASTLINE, + "Unrecognized pair style {} in compute pressure command", pstyle); } // detect contributions to virial @@ -235,7 +239,8 @@ double ComputePressure::compute_scalar() { invoked_scalar = update->ntimestep; if (update->vflag_global != invoked_scalar) - error->all(FLERR, Error::NOLASTLINE, "Virial was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, "Virial was not tallied on needed timestep" + + utils::errorurl(22)); // invoke temperature if it hasn't been already @@ -274,10 +279,11 @@ void ComputePressure::compute_vector() { invoked_vector = update->ntimestep; if (update->vflag_global != invoked_vector) - error->all(FLERR, Error::NOLASTLINE, "Virial was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Virial was not tallied on needed timestep" + utils::errorurl(22)); if (force->kspace && kspace_virial && force->kspace->scalar_pressure_flag) - error->all(FLERR,"Must use 'kspace_modify pressure/scalar no' for " + error->all(FLERR, Error::NOLASTLINE, "Must use 'kspace_modify pressure/scalar no' for " "tensor components with kspace_style msm"); // invoke temperature if it hasn't been already diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 6f237c03c9..f930fa0980 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -363,8 +363,8 @@ void DisplaceAtoms::command(int narg, char **arg) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms && comm->me == 0) - error->warning(FLERR,"Lost atoms via displace_atoms: original {} " - "current {}"+utils::errorurl(8),atom->natoms,natoms); + error->warning(FLERR,"Lost atoms via displace_atoms: original {} current {}"+utils::errorurl(8), + atom->natoms,natoms); } /* ---------------------------------------------------------------------- diff --git a/src/variable.cpp b/src/variable.cpp index 5ca3dbc2fb..4e1306e893 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -188,8 +188,8 @@ void Variable::set(int narg, char **arg) if (strcmp(arg[1], "delete") == 0) { if (narg > 2) - error->all(FLERR, 2, "Illegal variable delete command: expected 2 arguments but found {}", - narg); + error->all(FLERR, 2, "Illegal variable delete command: expected 2 arguments but found {}{}", + narg, utils::errorurl(3)); if (find(arg[0]) >= 0) remove(find(arg[0])); return; @@ -278,7 +278,7 @@ void Variable::set(int narg, char **arg) copy(num[nvar], &arg[2], data[nvar]); } else if (strcmp(arg[1], "uloop") == 0) { if (narg < 3 || narg > 4) - error->all(FLERR, 1, "Illegal variable command: expected 3 or 4 arguments but found {}: {}", + error->all(FLERR, 1, "Illegal variable command: expected 3 or 4 arguments but found {}{}", narg, utils::errorurl(3)); if (narg == 4 && strcmp(arg[3], "pad") != 0) error->all(FLERR, 3, "Invalid variable uloop argument: {}", arg[3]);