From: Fredrik Blomqvist (fredrik_blomqvist_at_[hidden])
Date: 2004-05-08 11:48:29
The switch-case in class archive_exception lacks a 'break' after the 'stream
which leads to incorrect what() message.
I also note that the error code "invalid_class_name" doesn't have a message
Furthermore I'm confused about this (which was the reason I found the other
(VC7.1 + Dinkumware)
oa << 'x';
// ofs.close(); // uncommenting this throws "stream_error" (altough
currently with wrong what() message)
oa << 'y';
std::ifstream ifs("serializer_test.txt", std::ios::binary);
char x, y;
ia >> x;
// ifs.close(); // uncommenting this _doesn't_ throw?
ia >> y;
assert(x == 'x' && y == 'y');
catch(std::exception const& e)
std::cout << e.what();
Shouldn't reading throw also? The archives check is/os.good() to throw.
Or is this a bug in my std.lib (or my understanding of it? ;)
// Fredrik Blomqvist
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk