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/group_parser.hpp

    r347 r462  
    2020         { 
    2121            StdIFStream ifs ( attributes["src"].c_str() , StdIFStream::in ); 
     22            if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 ) 
     23               ERROR(" void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)", 
     24                     <<endl<< "Can not open <"<<attributes["src"].c_str()<<"> file" ); 
    2225            if (!ifs.good()) 
    2326               ERROR("CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)", 
    2427                     << "[ filename = " << attributes["src"] << " ] Bad xml stream !"); 
    25             xml::CXMLParser::ParseInclude(ifs, *this); 
     28            xml::CXMLParser::ParseInclude(ifs, attributes["src"].c_str(), *this); 
    2629         } 
    2730      } 
Note: See TracChangeset for help on using the changeset viewer.