Robert,
In using xml_archive_exception, I find that I need to #include
. This required searching through the
boost directory since the documentation does not mention this requirement.
The only mention in the docs is to #include
, which is insufficient. I would have
expected that xml_archive_exception is part of the interface for an
xml_(i|o)archive and would be included when #include-ing
. Alternatively, perhaps this class
should be placed in and documented
as such, to be consistent with .
Additionally, I find the overlap of exception_code misleading when
debugging. I caught an archive_exception& and and code returns 0 -
'no_exception'( within the context of an archive_exception ). At this point
what() returns null also. Of course, catching an xml_archive_exception helps
because what() returns a reasonable description.
I run into the above, when loading a file, but that file was generated by a
legacy product(not xml or an archive). I had (erroneously)expected that
xml_archive would throw an xml_archive_exception equivalent to
exception_code==invalid_signature. It would be nice to have a some better
granularity on archive_parsing_error, that would tell me that the input does
not start with an xml header, or it's xml but not an xml_archive, or it
passed those two, and some other error occurs.
Thanks,
Jeff Flinn