20 #ifndef CO_DATASTREAMARCHIVEEXCEPTION_H
21 #define CO_DATASTREAMARCHIVEEXCEPTION_H
23 #include <boost/lexical_cast.hpp>
24 #include <boost/archive/archive_exception.hpp>
29 namespace serialization
32 const unsigned no_infnan = 64;
56 : boost::archive::archive_exception(other_exception)
57 , msg(
"requested integer size exceeds type size: ")
59 msg += boost::lexical_cast<std::string,
int>(invalid_size);
64 : boost::archive::archive_exception(other_exception)
65 , msg(
"cannot read a negative number into an unsigned type")
72 : boost::archive::archive_exception(other_exception)
73 , msg(
"serialization of illegal floating point value: ")
75 msg += boost::lexical_cast<std::string>(abnormal);
79 const char*
what()
const throw() {
return msg.c_str(); }
85 #endif //CO_DATAOSTREAMARCHIVE_H
Object-oriented network library.
DataStreamArchiveException(const T &abnormal)
serialization of inf, nan and denormals
DataStreamArchiveException()
negative number in unsigned type
DataStreamArchiveException(const signed char invalid_size)
type size is not large enough for deserialized number
Exception thrown when serialization cannot proceed.
const char * what() const
override the base class function with our message