Report the offset of an input stream error - #380
Conversation
`archive_exception` said only that the input failed, without giving a clue as to where the error occurred. It now names the offset at which the input went wrong, for text, binary and XML input archives alike.
|
Note that the archive interface doesn't presume that an archive is a type of io stream. This opens the way to certain special purpose archives which might do something like implement a deep copy, calculate a CRC, etc, etc, There might be an example of such a custom archive in the documentation. Consider this when adding to stream behavior. |
|
Hmm, thanks for the heads-up. However, the archive interface is untouched:
demo_trivial_archive.cpp, the example archive_reference.html points at, has a But one point is worth mentioning: an archive deriving from |
archive_exceptionsaid only that the input failed, without giving a clue as to where the error occurred. It now names the offset at which the input went wrong, for text, binary and XML input archives alike.