debug info to trace down "cannot rename temp session file" errors
..but actually, the real error may be concurrent calls to Session::save_state()
This commit is contained in:
parent
63d81d2419
commit
c9b0f0fcb7
|
@ -155,6 +155,20 @@ XMLTree::write() const
|
|||
xmlSetDocCompressMode(doc, _compression);
|
||||
writenode(doc, _root, doc->children, 1);
|
||||
result = xmlSaveFormatFileEnc(_filename.c_str(), doc, "UTF-8", 1);
|
||||
#ifndef NDEBUG
|
||||
if (result == -1) {
|
||||
xmlErrorPtr xerr = xmlGetLastError ();
|
||||
if (!xerr) {
|
||||
std::cerr << "unknown XML error during xmlSaveFormatFileEnc()." << std::endl;
|
||||
} else {
|
||||
std::cerr << "xmlSaveFormatFileEnc: error"
|
||||
<< " domain: " << xerr->domain
|
||||
<< " code: " << xerr->code
|
||||
<< " msg: " << xerr->message
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
xmlFreeDoc(doc);
|
||||
|
||||
if (result == -1) {
|
||||
|
|
Loading…
Reference in New Issue