mirror of https://github.com/vitalif/grive2
Log XML on parse failure
parent
8b434dad14
commit
986ab4acc6
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "Error.hh"
|
||||
#include "Node.hh"
|
||||
#include "util/log/Log.hh"
|
||||
|
||||
#include <expat.h>
|
||||
|
||||
|
@ -72,8 +73,10 @@ void TreeBuilder::ParseData( const char *data, std::size_t count, bool last )
|
|||
{
|
||||
is_new = false ;
|
||||
|
||||
if ( ::XML_Parse( m_impl->psr, data, count, last ) == 0 )
|
||||
if ( ::XML_Parse( m_impl->psr, data, count, last ) == 0 ) {
|
||||
Log("Error parsing XML: %1%", data, log::error);
|
||||
BOOST_THROW_EXCEPTION( Error() << ExpatApiError("XML_Parse") );
|
||||
}
|
||||
}
|
||||
|
||||
Node TreeBuilder::Parse( const std::string& xml )
|
||||
|
|
Loading…
Reference in New Issue