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_template_impl.hpp

    r446 r462  
    490490         { 
    491491            StdIFStream ifs ( attributes["src"].c_str() , StdIFStream::in ); 
     492            if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 ) 
     493               ERROR("void CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)", 
     494                     <<endl<< "Can not open <"<<attributes["src"].c_str()<<"> file" ); 
     495             
    492496            if (!ifs.good()) 
    493497               ERROR("CGroupTemplate<U, V, W>::parse(xml::CXMLNode & node, bool withAttr)", 
    494498                     << "[ filename = " << attributes["src"] << " ] Bad xml stream !"); 
    495             xml::CXMLParser::ParseInclude(ifs, *this); 
     499            xml::CXMLParser::ParseInclude(ifs, attributes["src"].c_str(), *this); 
    496500         } 
    497501      } 
Note: See TracChangeset for help on using the changeset viewer.