Boost C++ Libraries: Ticket #11974: Wrong problem description in xml_archive_exception https://svn.boost.org/trac10/ticket/11974 <p> xml_archive_exception::what() function returns incorrect problem description when deserialize corrupted XML file. Here is the code that thorws xml_archive_exception when some XML file is missing some required node: </p> <blockquote> <p> try { </p> <blockquote> <p> someConfigClass.<a class="missing wiki">ResetSettings</a>();<br /> std::ifstream ifs(<a class="missing wiki">ConfFileName</a>.c_str());<br /> assert(ifs.good());<br /> boost::archive::xml_iarchive ia(ifs);<br /> </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> ia &gt;&gt; BOOST_SERIALIZATION_NVP(someConfigClass); <strong>&lt;---EXCEPTION HERE</strong><br /> </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> ifs.close();<br /> </p> </blockquote> <p> } catch(boost::archive::xml_archive_exception&amp; e) { </p> <blockquote> <p> logger.Write(Logger::EError, e.what()); <strong>&lt;--HERE THE DESCRIPTION IS RETURNED</strong><br /> </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> return false; </p> </blockquote> <p> } </p> </blockquote> <p> In 1.52 version the xml_archive_exception::what() returned the following: </p> <p> <em>XML start/end tag mismatch – SOME_MISSING_XML_ELEMENT</em> </p> <p> In 1.57 version xml_archive_exception::what() returns this:<br /> </p> <p> <em>SOME_MISSING_XML_ELEMENT</em><br /> </p> <p> The mentioned code has noot been modified for a long time. But the version of boost has been changed. After that our test team noticed the error. Unfortunately i did not test it on last version. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11974 Trac 1.4.3 Robert Ramey Fri, 12 Feb 2016 21:45:23 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11974#comment:1 https://svn.boost.org/trac10/ticket/11974#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> OK - found this and fixed it - should show up in 1.61 release </p> Ticket