I've encountered the same issue(s) in the past where signals will be
raised when the data serialized is nothing close to what is expected.
I have been able to deal with it is by doing one, or all, of the following:
Derive all types which are "Serializable" from common base, then
always try to unserialize to<->from that base. From there,
switch/vector on the derived type, either through RTTI or some other
mechanism.
I would also recommend overloading the sig_hdlr, so you can
gracefully shutdown in case something runs-a-muck.
Hope this helps,
-Tim
On 11/1/07, Christoph
I am experimenting with Boost.Serialization. I tried to de-serialize a (binary) file written for a *different* class. Obviously, this can not work.
However, there is not thrown an exception. Question: (How) can I determine that the reading failed? (In case of corrupted or non-matching archives.)
(I have attached a small demo.)
Best regards Christoph
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Regards, Timothy St. Clair [timothysc@gmail.com]