|
Boost : |
From: Vyacheslav E. Andrejev (vandrejev_at_[hidden])
Date: 2005-04-08 06:28:24
Hello Robert,
I spent a lot of time trying to understand where my program failed. Finally,
I found that the cause was in destructor of basic_xml_oarchive class:
template<class Archive>
#if !defined(__BORLANDC__)
BOOST_DECL_ARCHIVE_OR_WARCHIVE
#endif
basic_xml_oarchive<Archive>::~basic_xml_oarchive(){
if(!header)
return;
this->This()->put("</boost_serialization>\n");
}
basic_text_oprimitive::put(const char * s) can throw an exception, causing
unexpected termination of program when stack unwind. I heard many times that
uncaught exception in destructor is not very good thing. Should we consider
refactoring of this point in basic_xml_oarchive?
Regards.
Slava.
-- Vyacheslav E. Andrejev System Architect, Excelsior, LLC
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk