--- trunk/mdtools/md_code/AllLong.cpp 2002/07/09 18:40:59 11 +++ trunk/mdtools/md_code/AllLong.cpp 2002/10/31 21:20:49 162 @@ -2,8 +2,8 @@ #include #include "LRI.hpp" +#include "simError.h" - extern "C" { @@ -186,9 +186,11 @@ AllLong::AllLong( SimInfo* entry_plug ){ if( isLJ[i] && isVDW[i+1] ) error = 1; if( error ){ - std::cerr << "longRange force error: You cannot mix Lenard-Jones and" - << " \"Exp - r^6\" type interactions\n"; - exit(8); + sprintf(painCave.errMsg, + "longRange force error: You cannot mix Lenard-Jones and" + " \"Exp - r^6\" type interactions\n"); + painCave.isFatal = 1; + simError(); } } @@ -303,12 +305,14 @@ void AllLong::calc_forces( void ){ if( isDipole[i] ){ if( !(atoms[i]->isDirectional()) ){ - std::cerr << "Something went Horribly wrong!!!!\n" - << "We're all gonna die in here!!!!!!!\n" - << "Oh yeah, by the way, atom " << i - << " somehow thinks it has a dipole,\n" - << "but it isn't a directional atom type.\n"; - exit(8); + sprintf( painCave.errMsg, + "Something went Horribly wrong!!!!\n" + "We're all gonna die in here!!!!!!!\n" + "Oh yeah, by the way, atom %d" + " somehow thinks it has a dipole,\n" + "but it isn't a directional atom type.\n", i); + painCave.isFatal = 1; + simError(); } dAtom = ( DirectionalAtom* )atoms[i];