|
Boost Users : |
From: Russell Balest (russell_at_[hidden])
Date: 2004-05-07 17:25:32
I'm reading from an xml archive (the impl provided) into an object of
the wrong class ( a sibling class with common abstract base class )
I catch archive_exception = 7 ( i/o error on stream).
what() returns "unknown derived exception" (incidentally)
At this point, enough of the archive has been read (namely a message
header) to allow me to know the correct class of the archived object (!).
So, now I create an object of the correct class and attempt to
unserialize it using the same archive.
This results in abort().
My questions are:
can I safely recover and read the archive again after an exception,
given that I have the archive and the istream object it was created with?
in general, can you read an archive more than once? does it rewind
itself automatically after a successful read?
Thanks,
Russell Balest
p.s. i'm not really planning to use this technique, just experimenting.
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