Ignore:
Timestamp:
May 19, 2008, 7:44:17 PM (13 years ago)
Author:
Peter
Message:

refs #330 for Matrix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Matrix.cc

    r1275 r1313  
    9898          break;
    9999       
    100         if(utility::is_double(element)) {
    101           v.push_back(atof(element.c_str()));
    102         }
    103         else if (!element.size() || utility::is_nan(element)) {
     100        if (!element.size())
    104101          v.push_back(std::numeric_limits<double>::quiet_NaN());
    105         }
    106102        else {
    107           std::stringstream ss("Warning: '");
    108           ss << element << "' is not accepted as a matrix element.";
    109           throw IO_error(ss.str());
     103          try {
     104            v.push_back(convert<double>(element));
     105          }
     106          catch (std::runtime_error& e) {
     107            std::stringstream ss(e.what());
     108            ss << "\nMatrix.cc: " << element
     109               << " is not accepted as a matrix element\n";
     110            throw IO_error(ss.str());
     111          }
    110112        }
    111113      }           
Note: See TracChangeset for help on using the changeset viewer.