15#ifdef _QX_ENABLE_BOOST_SERIALIZATION
16#if _QX_SERIALIZE_PORTABLE_BINARY
17#ifndef _QX_PORTABLE_ARCHIVE_EXCEPTION_H_
18#define _QX_PORTABLE_ARCHIVE_EXCEPTION_H_
24#include <boost/lexical_cast.hpp>
25#include <boost/archive/basic_archive.hpp>
26#include <boost/archive/archive_exception.hpp>
37 #if BOOST_VERSION < 104400
45 #
if BOOST_VERSION < 103700
46 boost::archive::ARCHIVE_VERSION()
48 boost::archive::BOOST_ARCHIVE_VERSION()
73 :
boost::archive::archive_exception(other_exception)
74 ,
msg(
"requested integer size exceeds type size: ")
76 msg += boost::lexical_cast<std::string, int>(invalid_size);
81 :
boost::archive::archive_exception(other_exception)
82 ,
msg(
"cannot read a negative number into an unsigned type")
89 :
boost::archive::archive_exception(other_exception)
90 ,
msg(
"serialization of illegal floating point value: ")
92 msg += boost::lexical_cast<std::string>(abnormal);
96 const char*
what()
const throw() {
return msg.c_str(); }
Exception being thrown when serialization cannot proceed.
portable_archive_exception(signed char invalid_size)
type size is not large enough for deserialized number
portable_archive_exception()
negative number in unsigned type
~portable_archive_exception()
const char * what() const
override the base class function with our message
portable_archive_exception(const T &abnormal)
serialization of inf, nan and denormals
const signed char magic_byte
boost::archive::version_type archive_version_type
const archive_version_type archive_version(boost::archive::ARCHIVE_VERSION())