Skip to content

Commit 0d90574

Browse files
committed
doc: Set bug error flag upon bug occurrence
1 parent 36017a9 commit 0d90574

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

namd/src/colvarproxy_namd.C

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,8 @@ void colvarproxy_namd::calculate()
492492

493493
for ( ; a_i != a_e; ++a_i, ++f_i ) {
494494
if (atoms_map[*a_i] < 0) {
495-
cvm::error("Bug: atoms_map at " + cvm::to_str(*a_i) + " is less than zero!\n");
495+
cvm::error("Bug: atoms_map at " + cvm::to_str(*a_i) + " is less than zero!\n",
496+
COLVARS_BUG_ERROR);
496497
}
497498
atoms_total_forces[atoms_map[*a_i]] = cvm::rvector((*f_i).x, (*f_i).y, (*f_i).z);
498499
n_total_forces++;
@@ -856,7 +857,7 @@ int colvarproxy_namd::init_atom(cvm::residue_id const &residue,
856857

857858
int const index = add_atom_slot(aid);
858859
if (atoms_map.empty()) {
859-
cvm::error("Bug: atoms_map is empty in colvarproxy_namd::init_atom!");
860+
cvm::error("Bug: atoms_map is empty in colvarproxy_namd::init_atom!", COLVARS_BUG_ERROR);
860861
}
861862
atoms_map[aid] = index;
862863
globalmaster->modifyRequestedAtomsPublic().add(aid);

0 commit comments

Comments
 (0)