|
Boost Users : |
Subject: [Boost-users] [serialization] unwinding "stack" of object during loading
From: Igor R (boost.lists_at_[hidden])
Date: 2011-11-13 10:39:28
Hello,
Consider the following structure:
struct outer
{
inner_type1 inner1_;
inner_type2 inner2_;
template<class Archive>
void HostPort::load(Archive &ar, const unsigned int version)
{
ar >> BOOST_SERIALIZATION_NVP(inner1_);
ar >> BOOST_SERIALIZATION_NVP(inner2_);
}
};
Assume that loading of inner1_ throws exception. Is there a way to
"unwind" the "stack" of objects gracefully (i.e. to skip until some
"end" marker of inner1_), and to proceed loading the next inner object
normally?
Thanks.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net