From 32a41b1abe1a4aab0892c9c2051be6ba5b379f1e Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Mon, 11 May 2020 22:17:58 +0200 Subject: New upstream version 2.2.0~rc1+repack --- boost/libs/serialization/src/archive_exception.cpp | 138 --------------------- 1 file changed, 138 deletions(-) delete mode 100644 boost/libs/serialization/src/archive_exception.cpp (limited to 'boost/libs/serialization/src/archive_exception.cpp') diff --git a/boost/libs/serialization/src/archive_exception.cpp b/boost/libs/serialization/src/archive_exception.cpp deleted file mode 100644 index 8fcc6eeb..00000000 --- a/boost/libs/serialization/src/archive_exception.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// archive_exception.cpp: - -// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to 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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#if (defined _MSC_VER) && (_MSC_VER == 1200) -# pragma warning (disable : 4786) // too long name, harmless warning -#endif - -#include -#include -#include - -#define BOOST_ARCHIVE_SOURCE -#include -#include - -namespace boost { -namespace archive { - -BOOST_ARCHIVE_DECL -unsigned int -archive_exception::append(unsigned int l, const char * a){ - while(l < (sizeof(m_buffer) - 1)){ - char c = *a++; - if('\0' == c) - break; - m_buffer[l++] = c; - } - m_buffer[l] = '\0'; - return l; -} - -BOOST_ARCHIVE_DECL -archive_exception::archive_exception( - exception_code c, - const char * e1, - const char * e2 -) BOOST_NOEXCEPT : - code(c) -{ - unsigned int length = 0; - switch(code){ - case no_exception: - length = append(length, "uninitialized exception"); - break; - case unregistered_class: - length = append(length, "unregistered class"); - if(NULL != e1){ - length = append(length, " - "); - length = append(length, e1); - } - break; - case invalid_signature: - length = append(length, "invalid signature"); - break; - case unsupported_version: - length = append(length, "unsupported version"); - break; - case pointer_conflict: - length = append(length, "pointer conflict"); - break; - case incompatible_native_format: - length = append(length, "incompatible native format"); - if(NULL != e1){ - length = append(length, " - "); - length = append(length, e1); - } - break; - case array_size_too_short: - length = append(length, "array size too short"); - break; - case input_stream_error: - length = append(length, "input stream error"); - break; - case invalid_class_name: - length = append(length, "class name too long"); - break; - case unregistered_cast: - length = append(length, "unregistered void cast "); - length = append(length, (NULL != e1) ? e1 : "?"); - length = append(length, "<-"); - length = append(length, (NULL != e2) ? e2 : "?"); - break; - case unsupported_class_version: - length = append(length, "class version "); - length = append(length, (NULL != e1) ? e1 : ""); - break; - case other_exception: - // if get here - it indicates a derived exception - // was sliced by passing by value in catch - length = append(length, "unknown derived exception"); - break; - case multiple_code_instantiation: - length = append(length, "code instantiated in more than one module"); - if(NULL != e1){ - length = append(length, " - "); - length = append(length, e1); - } - break; - case output_stream_error: - length = append(length, "output stream error"); - break; - default: - BOOST_ASSERT(false); - length = append(length, "programming error"); - break; - } -} - -BOOST_ARCHIVE_DECL -archive_exception::archive_exception(archive_exception const & oth) BOOST_NOEXCEPT : - std::exception(oth), - code(oth.code) -{ - std::memcpy(m_buffer,oth.m_buffer,sizeof m_buffer); -} - -BOOST_ARCHIVE_DECL -archive_exception::~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW {} - -BOOST_ARCHIVE_DECL const char * -archive_exception::what() const BOOST_NOEXCEPT_OR_NOTHROW { - return m_buffer; -} - -BOOST_ARCHIVE_DECL -archive_exception::archive_exception() BOOST_NOEXCEPT : - code(no_exception) -{} - -} // archive -} // boost -- cgit v1.2.3