Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/parser.cpp

    re138de re359a8  
    159159  if (input == NULL) {
    160160    eLog() << Verbose(0) << endl << "Unable to open " << name << ", is the directory correct?" << endl;
     161    performCriticalExit();
    161162    return false;
    162163  }
     
    179180  //Log() << Verbose(0) << line.str() << endl;
    180181  //Log() << Verbose(0) << "ColumnCounter[" << MatrixNr << "]: " << ColumnCounter[MatrixNr] << "." << endl;
    181   if (ColumnCounter[MatrixNr] == 0)
     182  if (ColumnCounter[MatrixNr] == 0) {
    182183    eLog() << Verbose(0) << "ColumnCounter[" << MatrixNr << "]: " << ColumnCounter[MatrixNr] << " from file " << name << ", this is probably an error!" << endl;
     184    performCriticalExit();
     185  }
    183186 
    184187  // scan rest for number of rows/lines
     
    193196  }
    194197  //Log() << Verbose(0) << "RowCounter[" << MatrixNr << "]: " << RowCounter[MatrixNr] << " from file " << name << "." << endl;
    195   if (RowCounter[MatrixNr] == 0)
     198  if (RowCounter[MatrixNr] == 0) {
    196199    eLog() << Verbose(0) << "RowCounter[" << MatrixNr << "]: " << RowCounter[MatrixNr] << " from file " << name << ", this is probably an error!" << endl;
     200    performCriticalExit();
     201  }
    197202
    198203  // allocate matrix if it's not zero dimension in one direction
     
    226231    }
    227232  } else {
    228     eLog() << Verbose(0) << "ERROR: Matrix nr. " << MatrixNr << " has column and row count of (" << ColumnCounter[MatrixNr] << "," << RowCounter[MatrixNr] << "), could not allocate nor parse!" << endl;
     233    eLog() << Verbose(1) << "Matrix nr. " << MatrixNr << " has column and row count of (" << ColumnCounter[MatrixNr] << "," << RowCounter[MatrixNr] << "), could not allocate nor parse!" << endl;
    229234  }
    230235  input.close();
     
    428433              if (m > RowCounter[ KeySets.OrderSet[Order][CurrentFragment] ]) {
    429434                eLog() << Verbose(0) << "In fragment No. " << KeySets.OrderSet[Order][CurrentFragment]   << " current force index " << m << " is greater than " << RowCounter[ KeySets.OrderSet[Order][CurrentFragment] ] << "!" << endl;
     435                performCriticalExit();
    430436                return false;
    431437              }
     
    471477    if (output == NULL) {
    472478      eLog() << Verbose(0) << "Unable to open output energy file " << line.str() << "!" << endl;
     479      performCriticalExit();
    473480      return false;
    474481    }
     
    500507  if (output == NULL) {
    501508    eLog() << Verbose(0) << "Unable to open output matrix file " << line.str() << "!" << endl;
     509    performCriticalExit();
    502510    return false;
    503511  }
     
    656664      if (j > RowCounter[MatrixCounter]) {
    657665        eLog() << Verbose(0) << "Current force index " << j << " is greater than " << RowCounter[MatrixCounter] << "!" << endl;
     666        performCriticalExit();
    658667        return false;
    659668      }
     
    793802      if (j > RowCounter[MatrixCounter]) {
    794803        eLog() << Verbose(0) << "Current hessian index " << j << " is greater than " << RowCounter[MatrixCounter] << ", where i=" << i << ", Order=" << Order << ", l=" << l << " and FragmentNr=" << FragmentNr << "!" << endl;
     804        performCriticalExit();
    795805        return false;
    796806      }
     
    800810          if (k > ColumnCounter[MatrixCounter]) {
    801811            eLog() << Verbose(0) << "Current hessian index " << k << " is greater than " << ColumnCounter[MatrixCounter] << ", where m=" << m << ", j=" << j << ", i=" << i << ", Order=" << Order << ", l=" << l << " and FragmentNr=" << FragmentNr << "!" << endl;
     812            performCriticalExit();
    802813            return false;
    803814          }
     
    852863              if (m > RowCounter[ KeySets.OrderSet[Order][CurrentFragment] ]) {
    853864                eLog() << Verbose(0) << "In fragment No. " << KeySets.OrderSet[Order][CurrentFragment]   << " current row index " << m << " is greater than " << RowCounter[ KeySets.OrderSet[Order][CurrentFragment] ] << "!" << endl;
     865                performCriticalExit();
    854866                return false;
    855867              }
     
    869881                  if (n > ColumnCounter[ KeySets.OrderSet[Order][CurrentFragment] ]) {
    870882                    eLog() << Verbose(0) << "In fragment No. " << KeySets.OrderSet[Order][CurrentFragment]   << " current column index " << n << " is greater than " << ColumnCounter[ KeySets.OrderSet[Order][CurrentFragment] ] << "!" << endl;
     883                    performCriticalExit();
    871884                    return false;
    872885                  }
Note: See TracChangeset for help on using the changeset viewer.