--- trunk/mdtools/interface_implementation/Globals.cpp 2002/07/09 18:40:59 11 +++ trunk/mdtools/interface_implementation/Globals.cpp 2002/11/11 17:25:15 173 @@ -3,6 +3,7 @@ #include #include "Globals.hpp" +#include "simError.h" /* * The following section lists all of the defined tokens for the @@ -138,21 +139,21 @@ int Globals::componentAssign( event* the_event ){ switch( the_event->evt.asmt.asmt_type ){ case STRING: - current_component->assignString( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.sval ); - return 1; + return current_component->assignString( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.sval, + &(the_event->err_msg)); break; case DOUBLE: - current_component->assignDouble( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.dval ); - return 1; + return current_component->assignDouble( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.dval, + &(the_event->err_msg)); break; case INT: - current_component->assignInt( the_event->evt.asmt.lhs, - the_event->evt.asmt.rhs.ival ); - return 1; + return current_component->assignInt( the_event->evt.asmt.lhs, + the_event->evt.asmt.rhs.ival, + &(the_event->err_msg)); break; default: @@ -793,9 +794,15 @@ int Globals::hash( char* text ){ // if the key is less than zero, we've had an overflow error - fprintf( stderr, + sprintf( painCave.errMsg, "There has been an overflow error in the Globals' hash key."); - exit(0); + painCave.isFatal = 1; + simError(); +#ifdef IS_MPI + if( painCave.isEventLoop ){ + if( worldRank == 0 ) mpiInterfaceExit(); + } +#endif //is_mpi } return key; @@ -812,4 +819,4 @@ void Globals::addHash( char* text, int token ){ key = hash( text ); the_element->setNext( command_table[key] ); command_table[key] = the_element; -}; +}