Ignore:
Timestamp:
01/21/14 09:40:14 (10 years ago)
Author:
ymipsl
Message:

Enhancement :

  • Improving error message occuring along the xml parsing : position (line number, column) is now indicated
  • New executable : parse_xml.exe : parse the xml files and reports potential error

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/context.cpp

    r461 r462  
    110110      { 
    111111         StdIFStream ifs ( attributes["src"].c_str() , StdIFStream::in ); 
     112         if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 ) 
     113            ERROR("void CContext::parse(xml::CXMLNode & node)", 
     114                  <<endl<< "Can not open <"<<attributes["src"].c_str()<<"> file" ); 
    112115         if (!ifs.good()) 
    113116            ERROR("CContext::parse(xml::CXMLNode & node)", 
    114117                  << "[ filename = " << attributes["src"] << " ] Bad xml stream !"); 
    115          xml::CXMLParser::ParseInclude(ifs, *this); 
     118         xml::CXMLParser::ParseInclude(ifs, attributes["src"], *this); 
    116119      } 
    117120 
Note: See TracChangeset for help on using the changeset viewer.