unpack_exception.hpp
Go to the documentation of this file.
//
// MessagePack for C++ deserializing routine
//
// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef MSGPACK_V1_UNPACK_EXCEPTION_HPP
#define MSGPACK_V1_UNPACK_EXCEPTION_HPP
#include "msgpack/versioning.hpp"
#include <string>
#include <stdexcept>
namespace msgpack {
MSGPACK_API_VERSION_NAMESPACE(v1) {
struct unpack_error : public std::runtime_error {
explicit unpack_error(const std::string& msg)
:std::runtime_error(msg) {}
#if !defined(MSGPACK_USE_CPP03)
explicit unpack_error(const char* msg):
std::runtime_error(msg) {}
#endif // !defined(MSGPACK_USE_CPP03)
};
struct parse_error : public unpack_error {
explicit parse_error(const std::string& msg)
:unpack_error(msg) {}
#if !defined(MSGPACK_USE_CPP03)
explicit parse_error(const char* msg)
:unpack_error(msg) {}
#endif // !defined(MSGPACK_USE_CPP03)
};
struct insufficient_bytes : public unpack_error {
explicit insufficient_bytes(const std::string& msg)
:unpack_error(msg) {}
#if !defined(MSGPACK_USE_CPP03)
explicit insufficient_bytes(const char* msg)
:unpack_error(msg) {}
#endif // !defined(MSGPACK_USE_CPP03)
};
struct size_overflow : public unpack_error {
explicit size_overflow(const std::string& msg)
:unpack_error(msg) {}
#if !defined(MSGPACK_USE_CPP03)
explicit size_overflow(const char* msg)
:unpack_error(msg) {}
#endif
};
struct array_size_overflow : public size_overflow {
array_size_overflow(const std::string& msg)
:size_overflow(msg) {}
#if !defined(MSGPACK_USE_CPP03)
array_size_overflow(const char* msg)
:size_overflow(msg) {}
#endif
};
struct map_size_overflow : public size_overflow {
map_size_overflow(const std::string& msg)
:size_overflow(msg) {}
#if !defined(MSGPACK_USE_CPP03)
map_size_overflow(const char* msg)
:size_overflow(msg) {}
#endif
};
struct str_size_overflow : public size_overflow {
str_size_overflow(const std::string& msg)
:size_overflow(msg) {}
#if !defined(MSGPACK_USE_CPP03)
str_size_overflow(const char* msg)
:size_overflow(msg) {}
#endif
};
struct bin_size_overflow : public size_overflow {
bin_size_overflow(const std::string& msg)
:size_overflow(msg) {}
#if !defined(MSGPACK_USE_CPP03)
bin_size_overflow(const char* msg)
:size_overflow(msg) {}
#endif
};
struct ext_size_overflow : public size_overflow {
ext_size_overflow(const std::string& msg)
:size_overflow(msg) {}
#if !defined(MSGPACK_USE_CPP03)
ext_size_overflow(const char* msg)
:size_overflow(msg) {}
#endif
};
struct depth_size_overflow : public size_overflow {
depth_size_overflow(const std::string& msg)
:size_overflow(msg) {}
#if !defined(MSGPACK_USE_CPP03)
depth_size_overflow(const char* msg)
:size_overflow(msg) {}
#endif
};
} // MSGPACK_API_VERSION_NAMESPACE(v1)
} // namespace msgpack
#endif // MSGPACK_V1_UNPACK_EXCEPTION_HPP
msgpack::map_size_overflow::map_size_overflow
map_size_overflow(const char *msg)
Definition: unpack_exception.hpp:74
msgpack::ext_size_overflow::ext_size_overflow
ext_size_overflow(const std::string &msg)
Definition: unpack_exception.hpp:98
msgpack::insufficient_bytes::insufficient_bytes
insufficient_bytes(const char *msg)
Definition: unpack_exception.hpp:47
msgpack::str_size_overflow
Definition: unpack_exception.hpp:79
msgpack::unpack_error::unpack_error
unpack_error(const std::string &msg)
Definition: unpack_exception.hpp:26
msgpack::unpack_error::unpack_error
unpack_error(const char *msg)
Definition: unpack_exception.hpp:29
msgpack::map_size_overflow::map_size_overflow
map_size_overflow(const std::string &msg)
Definition: unpack_exception.hpp:71
msgpack::depth_size_overflow::depth_size_overflow
depth_size_overflow(const std::string &msg)
Definition: unpack_exception.hpp:107
msgpack::unpack_error
Definition: unpack_exception.hpp:25
msgpack::depth_size_overflow
Definition: unpack_exception.hpp:106
msgpack::parse_error::parse_error
parse_error(const std::string &msg)
Definition: unpack_exception.hpp:35
msgpack
Definition: adaptor_base.hpp:15
msgpack::parse_error
Definition: unpack_exception.hpp:34
msgpack::ext_size_overflow
Definition: unpack_exception.hpp:97
versioning.hpp
msgpack::bin_size_overflow::bin_size_overflow
bin_size_overflow(const char *msg)
Definition: unpack_exception.hpp:92
msgpack::str_size_overflow::str_size_overflow
str_size_overflow(const std::string &msg)
Definition: unpack_exception.hpp:80
msgpack::depth_size_overflow::depth_size_overflow
depth_size_overflow(const char *msg)
Definition: unpack_exception.hpp:110
msgpack::size_overflow
Definition: unpack_exception.hpp:52
msgpack::ext_size_overflow::ext_size_overflow
ext_size_overflow(const char *msg)
Definition: unpack_exception.hpp:101
msgpack::array_size_overflow::array_size_overflow
array_size_overflow(const std::string &msg)
Definition: unpack_exception.hpp:62
msgpack::bin_size_overflow
Definition: unpack_exception.hpp:88
msgpack::insufficient_bytes
Definition: unpack_exception.hpp:43
msgpack::array_size_overflow
Definition: unpack_exception.hpp:61
msgpack::array_size_overflow::array_size_overflow
array_size_overflow(const char *msg)
Definition: unpack_exception.hpp:65
msgpack::insufficient_bytes::insufficient_bytes
insufficient_bytes(const std::string &msg)
Definition: unpack_exception.hpp:44
msgpack::map_size_overflow
Definition: unpack_exception.hpp:70
msgpack::parse_error::parse_error
parse_error(const char *msg)
Definition: unpack_exception.hpp:38
MSGPACK_API_VERSION_NAMESPACE
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
msgpack::size_overflow::size_overflow
size_overflow(const std::string &msg)
Definition: unpack_exception.hpp:53
msgpack::size_overflow::size_overflow
size_overflow(const char *msg)
Definition: unpack_exception.hpp:56
msgpack::bin_size_overflow::bin_size_overflow
bin_size_overflow(const std::string &msg)
Definition: unpack_exception.hpp:89
msgpack::str_size_overflow::str_size_overflow
str_size_overflow(const char *msg)
Definition: unpack_exception.hpp:83