Skip to content

Commit

Permalink
Boost exception updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jun 25, 2019
1 parent f1a90a4 commit 59f8bd0
Show file tree
Hide file tree
Showing 27 changed files with 667 additions and 146 deletions.
27 changes: 27 additions & 0 deletions vendor/pdalboost/boost/exception/all.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.

//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 UUID_316FDA946C0D11DEA9CBAE5255D89593
#define UUID_316FDA946C0D11DEA9CBAE5255D89593

#include <boost/config.hpp>
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/error_info.hpp>
#include <boost/exception/exception.hpp>
#include <boost/exception/get_error_info.hpp>
#include <boost/exception/info.hpp>
#include <boost/exception/info_tuple.hpp>
#include <boost/exception/errinfo_api_function.hpp>
#include <boost/exception/errinfo_at_line.hpp>
#include <boost/exception/errinfo_errno.hpp>
#include <boost/exception/errinfo_file_handle.hpp>
#include <boost/exception/errinfo_file_name.hpp>
#include <boost/exception/errinfo_file_open_mode.hpp>
#include <boost/exception/errinfo_type_info_name.hpp>
#ifndef BOOST_NO_EXCEPTIONS
#include <boost/exception/errinfo_nested_exception.hpp>
#include <boost/exception_ptr.hpp>
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#endif

namespace
pdalboost
boost
{
template <class E>
inline
Expand Down
60 changes: 44 additions & 16 deletions vendor/pdalboost/boost/exception/detail/error_info_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@

#ifndef UUID_CE6983AC753411DDA764247956D89593
#define UUID_CE6983AC753411DDA764247956D89593

#include <boost/config.hpp>
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
#endif
#include <utility>
#include <string>

#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

#include <string>

namespace
pdalboost
{
Expand All @@ -26,8 +32,7 @@ pdalboost
public:

virtual std::string name_value_string() const = 0;

protected:
virtual error_info_base * clone() const = 0;

virtual
~error_info_base() throw()
Expand All @@ -41,30 +46,53 @@ pdalboost
error_info:
public exception_detail::error_info_base
{
error_info_base *
clone() const
{
return new error_info<Tag,T>(*this);
}
public:

typedef T value_type;

error_info( value_type const & value );
~error_info() throw();

error_info( value_type const & v ):
v_(v)
{
}
#if (__GNUC__*100+__GNUC_MINOR__!=406) //workaround for g++ bug
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
error_info( error_info const & x ):
v_(x.v_)
{
}
error_info( T && v ) BOOST_NOEXCEPT_IF(pdalboost::is_nothrow_move_constructible<T>::value):
v_(std::move(v))
{
}
error_info( error_info && x ) BOOST_NOEXCEPT_IF(pdalboost::is_nothrow_move_constructible<T>::value):
v_(std::move(x.v_))
{
}
#endif
#endif
~error_info() throw()
{
}
value_type const &
value() const
{
return value_;
return v_;
}

value_type &
value()
{
return value_;
return v_;
}

private:

error_info & operator=( error_info const & );
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
error_info & operator=( error_info && x );
#endif
std::string name_value_string() const;

value_type value_;
value_type v_;
};
}

Expand Down
19 changes: 10 additions & 9 deletions vendor/pdalboost/boost/exception/detail/exception_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

#ifndef UUID_618474C2DE1511DEB74A388C56D89593
#define UUID_618474C2DE1511DEB74A388C56D89593
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

#include <boost/config.hpp>
#ifdef BOOST_NO_EXCEPTIONS
Expand All @@ -19,8 +13,8 @@
#include <boost/exception/exception.hpp>
#include <boost/exception/info.hpp>
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/detail/type_info.hpp>
#include <boost/exception/detail/clone_current_exception.hpp>
#include <boost/exception/detail/type_info.hpp>
#ifndef BOOST_NO_RTTI
#include <boost/core/demangle.hpp>
#endif
Expand All @@ -30,6 +24,13 @@
#include <ios>
#include <stdlib.h>

#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

namespace
pdalboost
{
Expand Down Expand Up @@ -394,7 +395,7 @@ pdalboost
{
return exception_detail::current_exception_std_exception(e);
}
#ifndef BOOST_NO_TYPEID
#ifndef BOOST_NO_TYPEID
catch(
std::bad_cast & e )
{
Expand All @@ -405,7 +406,7 @@ pdalboost
{
return exception_detail::current_exception_std_exception(e);
}
#endif
#endif
catch(
std::bad_exception & e )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@

#ifndef UUID_898984B4076411DD973EDFA055D89593
#define UUID_898984B4076411DD973EDFA055D89593

#include <ostream>

#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

#include <ostream>

namespace
pdalboost
{
Expand Down
13 changes: 7 additions & 6 deletions vendor/pdalboost/boost/exception/detail/object_hex_dump.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

#ifndef UUID_6F463AC838DF11DDA3E6909F56D89593
#define UUID_6F463AC838DF11DDA3E6909F56D89593
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

#include <boost/exception/detail/type_info.hpp>
#include <iomanip>
Expand All @@ -19,6 +13,13 @@
#include <sstream>
#include <cstdlib>

#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

namespace
pdalboost
{
Expand Down
17 changes: 17 additions & 0 deletions vendor/pdalboost/boost/exception/detail/shared_ptr.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.

//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 UUID_837060E885AF11E68DA91D15E31AC075
#define UUID_837060E885AF11E68DA91D15E31AC075

#ifdef BOOST_EXCEPTION_MINI_BOOST
#include <memory>
namespace pdalboost { namespace exception_detail { using std::shared_ptr; } }
#else
#include <boost/shared_ptr.hpp>
namespace pdalboost { namespace exception_detail { using pdalboost::shared_ptr; } }
#endif

#endif
13 changes: 7 additions & 6 deletions vendor/pdalboost/boost/exception/detail/type_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@

#ifndef UUID_C3E1741C754311DDB2834CCA55D89593
#define UUID_C3E1741C754311DDB2834CCA55D89593

#include <boost/config.hpp>
#include <boost/core/typeinfo.hpp>
#include <boost/core/demangle.hpp>
#include <boost/current_function.hpp>
#include <string>

#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

#include <boost/core/typeinfo.hpp>
#include <boost/core/demangle.hpp>
#include <boost/current_function.hpp>
#include <boost/config.hpp>
#include <string>

namespace
pdalboost
{
Expand Down
17 changes: 10 additions & 7 deletions vendor/pdalboost/boost/exception/diagnostic_information.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

#ifndef UUID_0552D49838DD11DD90146B8956D89593
#define UUID_0552D49838DD11DD90146B8956D89593
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

#include <boost/config.hpp>
#include <boost/exception/get_error_info.hpp>
Expand All @@ -22,9 +16,18 @@
#include <exception>
#include <sstream>
#include <string>

#ifndef BOOST_NO_EXCEPTIONS
#include <boost/exception/current_exception_cast.hpp>
#endif

#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif

#ifndef BOOST_NO_EXCEPTIONS
namespace
pdalboost
{
Expand Down
11 changes: 11 additions & 0 deletions vendor/pdalboost/boost/exception/enable_current_exception.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.

//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 UUID_851700A4F7CF11E6B2EE06DD14915323
#define UUID_851700A4F7CF11E6B2EE06DD14915323

#include <boost/exception/exception.hpp>

#endif
11 changes: 11 additions & 0 deletions vendor/pdalboost/boost/exception/enable_error_info.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.

//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 UUID_A0F7404AF7CF11E6908227DD14915323
#define UUID_A0F7404AF7CF11E6908227DD14915323

#include <boost/exception/exception.hpp>

#endif
22 changes: 22 additions & 0 deletions vendor/pdalboost/boost/exception/errinfo_api_function.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.

//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 UUID_DDFBB4546C1211DEA4659E9055D89593
#define UUID_DDFBB4546C1211DEA4659E9055D89593

#include <boost/exception/error_info.hpp>

namespace
pdalboost
{
//Usage hint:
//if( api_function(....)!=0 )
// BOOST_THROW_EXCEPTION(
// failure() <<
// errinfo_api_function("api_function") );
typedef error_info<struct errinfo_api_function_,char const *> errinfo_api_function;
}

#endif
18 changes: 18 additions & 0 deletions vendor/pdalboost/boost/exception/errinfo_at_line.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.

//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 UUID_E7255CE26C1211DE85800C9155D89593
#define UUID_E7255CE26C1211DE85800C9155D89593

namespace
pdalboost
{
template <class Tag,class T> class error_info;

//Use with parsing errors exceptions, for example in a XML file parser.
typedef error_info<struct errinfo_at_line_,int> errinfo_at_line;
}

#endif

0 comments on commit 59f8bd0

Please sign in to comment.