Subject: [Boost-bugs] [Boost C++ Libraries] #11974: Wrong problem description in xml_archive_exception
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-02-10 15:02:30
#11974: Wrong problem description in xml_archive_exception
-------------------------------+---------------------------
Reporter: andrey_Elizarov@⦠| Owner: ramey
Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
Version: Boost 1.57.0 | Severity: Problem
Keywords: |
-------------------------------+---------------------------
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:
try
{
someConfigClass.ResetSettings();[[BR]]
std::ifstream ifs(ConfFileName.c_str());[[BR]]
assert(ifs.good());[[BR]]
boost::archive::xml_iarchive ia(ifs);[[BR]]
ia >> BOOST_SERIALIZATION_NVP(someConfigClass);
'''<---EXCEPTION HERE'''[[BR]]
ifs.close();[[BR]]
}
catch(boost::archive::xml_archive_exception& e)
{
logger.Write(Logger::EError, e.what()); '''<--HERE THE
DESCRIPTION IS RETURNED'''[[BR]]
return false;
}
In 1.52 version the xml_archive_exception::what() returned the following:
''XML start/end tag mismatch â SOME_MISSING_XML_ELEMENT''
In 1.57 version xml_archive_exception::what() returns this:[[BR]]
''SOME_MISSING_XML_ELEMENT''[[BR]]
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.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11974> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC