--- trunk/OOPSE-4/src/io/DirectionalAtomTypesSectionParser.cpp 2005/01/17 22:17:20 1956 +++ trunk/OOPSE-4/src/io/DirectionalAtomTypesSectionParser.cpp 2005/01/25 17:45:23 1957 @@ -42,7 +42,7 @@ #include "io/DirectionalAtomTypesSectionParser.hpp" #include "UseTheForce/ForceField.hpp" #include "types/DirectionalAtomType.hpp" - +#include "utils/simError.h" namespace oopse { DirectionalAtomTypesSectionParser::DirectionalAtomTypesSectionParser() { @@ -56,7 +56,11 @@ void DirectionalAtomTypesSectionParser::parseLine(Forc //in AtomTypeSection, a line at least contains 2 tokens //atomTypeName and mass if (nTokens < 4) { - std::cerr << "DirectionalAtomTypesSectionParser:: Not enought Tokens" << std::endl; + sprintf(painCave.errMsg, "DirectionalAtomTypesSectionParser Error: Not enough tokens at line %d\n", + lineNo); + painCave.isFatal = 1; + simError(); + } else { std::string atomTypeName = tokenizer.nextToken(); @@ -71,7 +75,9 @@ void DirectionalAtomTypesSectionParser::parseLine(Forc } else { dAtomType = dynamic_cast(atomType); if (dAtomType == NULL) { - std::cerr << "DirectionalAtomTypesSectionParser:: Can not cast to DirectionalAtomType" << std::endl; + sprintf(painCave.errMsg,"DirectionalAtomTypesSectionParser:: Can not cast to DirectionalAtomType"); + painCave.isFatal = 1; + simError(); } }