Boost logo

Boost Users :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2008-07-03 02:06:56


On 2 Jul 2008, at 23:28, Mathieu Peyréga wrote:

> I dont have the knowledge of the inner coding of the archives... but
> as far as I understood the issue come from theses lines :
>
> if(3 < ar.get_library_version())
> ar >> BOOST_SERIALIZATION_NVP(item_version);
>
> in the vector.hpp header file (load method)
>
> would it be possible to surround these lines with a try catch block
> in a way like this :
>
> try
> {
> if(3 < ar.get_library_version())
> ar >> BOOST_SERIALIZATION_NVP(item_version);
> }
> catch(...)
> {
> do something to reset the state of the archive before the ar >>
> BOOST_SERIALIZATION_NVP(item_version); attempt
> }
>
> Is it something possible or am i just a dreamer ? would it have some
> performance impact ? In such a case maybe it could be a choice to
> have a full compatible library with an
> #ifdef code selection mechanism...
>
> I hope this proposal is not too ridiculous....

This might or might not throw an exception, and the exception might be
thrown somewhere farther along deserialization.

Matthias


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