Compare commits

...

31 Commits

Author SHA1 Message Date
9bd0584aa9 Fixed multi-thread bug introduced by the previous change to copy_exception. 2020-08-14 19:42:29 -07:00
0016f52fba asan 2020-08-12 16:03:51 -07:00
7e8f0cd9bb copy_exception/make_exception_ptr implemented via wrapexcept rather than throw/catch 2020-08-11 19:40:30 -07:00
330008445c make_exception_ptr 2020-07-06 17:09:06 -07:00
63b57749a2 Mark error_info_container_impl final. (#27)
This should allow for better code optimization and also silence
compiler warnings about non-virtual destructor.
2020-04-30 15:05:51 -07:00
865cb399d5 Change __CODEGEARC__ to BOOST_CODEGEARC, which is defined in Boost config for the Embarcadero non-clang-based compilers. (#32) 2020-04-30 14:26:21 -07:00
ff0bcc1d85 Added #pragma clang system_header 2020-04-06 18:23:52 -07:00
c07417af68 Merge branch 'develop' 2020-02-17 18:58:02 -08:00
9197b6a880 Updated copyright message 2020-02-17 18:57:47 -08:00
012921be43 Merge branch 'develop' 2020-02-10 09:52:27 -08:00
0353b975f8 Fix MSVC-11 compilation error. (#30)
The compiler supports std::exception_ptr but does not support uniform
initialization syntax.

Co-authored-by: Emil Dotchevski <emildotchevski@gmail.com>
2020-02-09 21:01:10 -08:00
bd1a6ee1bb Removed broken appveyor configuration 2020-02-09 20:56:10 -08:00
93692697ef Fixing MSVC-11 compilation error, thanks Lastique 2020-02-09 16:52:49 -08:00
120b35fde2 AppVeyor 2020-02-09 16:41:30 -08:00
a5a8e865c0 Merge branch 'develop' 2020-01-31 12:02:34 -08:00
81e9a137eb Added testing for CXXSTD 98, 03 2020-01-29 14:05:11 -08:00
3f6ff1a8bf std_exception_ptr_wrapper 2020-01-29 14:02:40 -08:00
af98afb3d1 Attempt to solve issue #10 (#24)
* Attempt to solve issue #10

In boost::current_exception(), after all supported types of exception have
been checked for, a boost::unknown_exception is stored in the
boost::exception_ptr as a last resort to signal that an exception was indeed
stored, but that the actual type and value of the exception was lost.

Now, in case C++11 std::current_exception() is supported, the
std::exception_ptr result of calling std::current_exception() is what
gets stored inside the boost::exception_ptr. Later, inside
boost::rethrow_exception, the std::exception_ptr is retrieved from
the boost::exception_ptr and whatever exception it stores is thrown via
std::rethrow_exception().

The main benefit is than now any exception thrown via plain 'throw'
can be trasnported via boost::exception_ptr. Before this change it was
required that the throw site either used boost::enable_current_exception()
or boost::throw_exception() or threw an exception type inheriting from
boost::exception, which was impossible for third party software
that does not use Boost.Exception.

The detection of std::current_exception() is currently done via config macro
BOOST_NO_CXX11_NOEXCEPT, assuming that if 'noexcept' is supported then
std::exception_ptr is also supported. A better solution would require a new
dedicated macro in Boost.Config.

* Detect support for std::current_exception() via config macro BOOST_NO_CXX11_HDR_EXCEPTION

The temporary solution via BOOST_NO_CXX11_NOEXCEPT was an ugly hack
that is no longer necessary now that Boost.Config has
BOOST_NO_CXX11_HDR_EXCEPTION (pending merge to develop).

* Attempt to solve issue #10

In boost::current_exception(), after all supported types of exception have
been checked for, a boost::unknown_exception is stored in the
boost::exception_ptr as a last resort to signal that an exception was indeed
stored, but that the actual type and value of the exception was lost.

Now, in case C++11 std::current_exception() is supported, the
std::exception_ptr result of calling std::current_exception() is what
gets stored inside the boost::exception_ptr. Later, inside
boost::rethrow_exception, the std::exception_ptr is retrieved from
the boost::exception_ptr and whatever exception it stores is thrown via
std::rethrow_exception().

The main benefit is than now any exception thrown via plain 'throw'
can be trasnported via boost::exception_ptr. Before this change it was
required that the throw site either used boost::enable_current_exception()
or boost::throw_exception() or threw an exception type inheriting from
boost::exception, which was impossible for third party software
that does not use Boost.Exception.

The detection of std::current_exception() is currently done via config macro
BOOST_NO_CXX11_NOEXCEPT, assuming that if 'noexcept' is supported then
std::exception_ptr is also supported. A better solution would require a new
dedicated macro in Boost.Config.

* Detect support for std::current_exception() via config macro BOOST_NO_CXX11_HDR_EXCEPTION

The temporary solution via BOOST_NO_CXX11_NOEXCEPT was an ugly hack
that is no longer necessary now that Boost.Config has
BOOST_NO_CXX11_HDR_EXCEPTION (pending merge to develop).

* Document detection of C++11 std::current_exception through BOOST_NO_CXX11_HDR_EXCEPTION

* Added dist: trusty for Travis config, as recommended by pdimov in issue #10

* Stupid gcc 4.7 and 4.8 are confused initializing a reference with braces, using equal sign hoping it works (tested similar code on godbolt).
2020-01-29 13:41:48 -08:00
f68cd7b2d4 More g++ testing on travis 2020-01-28 20:11:17 -08:00
e8c57591a3 Missing #include <stdlib.h> in tests 2020-01-28 16:39:28 -08:00
c4e5f44e94 travis 2020-01-28 13:57:53 -08:00
1f90ecc324 travis 2020-01-28 13:18:22 -08:00
820338c36b Merge branch 'develop' of https://github.com/boostorg/exception into develop 2020-01-28 13:05:06 -08:00
9c8f2b6400 More travis testing 2020-01-28 13:04:55 -08:00
6bc76ee326 dist: trusty 2020-01-26 19:33:31 -08:00
0036e62dce fixing ABI mismatch error 2019-12-24 20:15:08 -08:00
9d8f16f4e6 Merge branch 'develop' 2019-12-21 19:14:58 -08:00
87f0473396 Fixed link error in no_exceptions_test.cpp 2019-12-21 19:14:44 -08:00
d0963a7cf6 Added missing #include in cloning_test.cpp 2019-12-21 14:27:14 -08:00
80ad850f3a Merge branch 'develop' 2019-12-21 14:18:03 -08:00
8e61e8e9fd #include guards prefixed with BOOST_EXCEPTION_ 2019-12-21 14:15:17 -08:00
40 changed files with 767 additions and 135 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/.vscode/ipch/*
/.vscode/settings.json

View File

@ -1,5 +1,5 @@
# Copyright 2017 Emil Dotchevski
# Copyright 2016 Peter Dimov
# Copyright 2016-2018 Peter Dimov
# Copyright 2018-2019 Emil Dotchevski
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
@ -7,6 +7,8 @@ language: cpp
sudo: false
dist: trusty
python: "2.7"
os:
@ -17,6 +19,7 @@ branches:
only:
- master
- develop
- /^feature.*/
env:
matrix:
@ -25,14 +28,16 @@ env:
addons:
apt:
packages:
- g++-4.7
- g++-4.8
- g++-4.9
- g++-5
- g++-6
- clang-3.6
- clang-3.7
- clang-3.8
- ruby-full
# - python-3.6
- ninja-build
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise
@ -46,53 +51,348 @@ matrix:
- env: BOGUS_JOB=true
include:
- os: linux
env: TOOLSET=gcc COMPILER=g++ CXXSTD=c++0x
- os: linux
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=c++0x
- os: linux
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=c++0x
- os: linux
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=c++0x
- os: linux
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++0x
- os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++0x
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=c++0x
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=c++0x
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=c++0x
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++0x
osx_image: xcode11.2
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode11.1
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode11
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode10.3
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode10.2
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode10.1
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode10
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode9.4
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode9.3
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode9.2
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode9.1
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode9
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode8.3
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
osx_image: xcode8
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z
- os: osx
compiler: clang++
env: UBSAN=1 TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
- os: linux
compiler: g++-4.7
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=98,03,11
addons:
apt:
packages:
- g++-4.7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.8
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=98,03,11
addons:
apt:
packages:
- g++-4.8
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.9
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=98,03,11
addons:
apt:
packages:
- g++-4.9
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-5
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-6
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=98,03,11,14,17
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-8
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=98,03,11,14,17
addons:
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-9
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=98,03,11,14,17,2a
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-9
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-9 CXXSTD=98,03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=98,03,11
addons:
apt:
packages:
- clang-3.3
- os: linux
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=98,03,11
addons:
apt:
packages:
- clang-3.4
- os: linux
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=98,03,11
- os: linux
compiler: clang++-3.5
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- clang-3.5
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++-3.6
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- clang-3.6
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++-3.7
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- clang-3.7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- os: linux
compiler: clang++-3.8
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- clang-3.8
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++-3.9
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- clang-3.9
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++-4.0
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- clang-4.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- os: linux
compiler: clang++-5.0
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=98,03,11,14,1z
addons:
apt:
packages:
- clang-5.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
- os: linux
compiler: clang++-6.0
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=98,03,11,14,17
addons:
apt:
packages:
- clang-6.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- os: linux
compiler: clang++-7
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=98,03,11,14,17,2a
addons:
apt:
packages:
- clang-7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
- os: linux
compiler: clang++-8
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=98,03,11,14,17,2a
addons:
apt:
packages:
- clang-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
- os: linux
dist: xenial
compiler: clang++-9
env: TOOLSET=clang COMPILER=clang++-9 CXXSTD=98,03,11,14,17,2a
addons:
apt:
packages:
- clang-9
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- os: linux
compiler: clang++-8
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-8 CXXSTD=98,03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
addons:
apt:
packages:
- clang-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
install:
- gem install asciidoctor
- gem install coderay
- cd ..
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
- git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init tools/inspect
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
- rm -rf libs/exception
- mkdir libs/exception
- cp -r $TRAVIS_BUILD_DIR/* libs/exception
- python tools/boostdep/depinst/depinst.py exception
- ./bootstrap.sh
- ./b2 headers
- cd libs/exception
script:
- |-
echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam
- ./b2 libs/exception/test toolset=$TOOLSET
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
- ../../b2 test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${UBSAN:+cxxflags=-fsanitize=address,undefined cxxflags=-fno-sanitize-recover=address,undefined linkflags=-fsanitize=address,undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
- ../../b2 exception-handling=off rtti=off test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${UBSAN:+cxxflags=-fsanitize=address,undefined cxxflags=-fno-sanitize-recover=address,undefined linkflags=-fsanitize=address,undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
notifications:
email:

69
appveyor.yml Normal file
View File

@ -0,0 +1,69 @@
# Copyright 2016-2019 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- master
- develop
- /feature\/.*/
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-12.0,msvc-14.0
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
CXXSTD: 14,17
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: clang-win
CXXSTD: 14,17
ADDRMD: 64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: msvc-14.2
CXXSTD: 14,17
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\cygwin\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\mingw\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ADDPATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;
TOOLSET: gcc
CXXSTD: 03,11,14,1z
install:
- set BOOST_BRANCH=develop
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
- cd ..
- git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init tools/boost_install
- git submodule update --init libs/config
- git submodule update --init libs/headers
- git submodule update --init tools/boostdep
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\exception\
- python tools/boostdep/depinst/depinst.py exception
- cmd /c bootstrap
- b2 headers
build: off
test_script:
- PATH=%ADDPATH%%PATH%
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
- b2 -j3 libs/exception/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release

View File

@ -38,7 +38,7 @@ boost
<p>Nothing.</p>
<h4>Notes:</h4>
<div><ul><li> It is unspecified whether the return values of two successive calls to <span class="RenoLink">current_exception</span> refer to the same exception object.</li>
<li> Correct implementation of <span class="RenoLink">current_exception</span> may require compiler support, unless <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> was used at the time the currently handled exception object was passed to throw. Whenever <span class="RenoLink">current_exception</span> fails to properly copy the current exception object, it returns an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> to an object of type that is as close as possible to the original exception type, using <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span> as a final fallback. All such types derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, and:<div><ul><li> if the original exception object derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, then the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> sub-object of the object referred to by the returned <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> is initialized by the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> copy constructor;</li>
<li> Correct implementation of <span class="RenoLink">current_exception</span> may require compiler support (e.g. C++11 <a href="https://en.cppreference.com/w/cpp/error/current_exception">std::current_exception()</a> is used when available, as specified by Boost.Config BOOST_NO_CXX11_HDR_EXCEPTION), unless <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> was used at the time the currently handled exception object was passed to throw. Whenever <span class="RenoLink">current_exception</span> fails to properly copy the current exception object, it returns an <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> to an object of type that is as close as possible to the original exception type, using <span class="RenoLink"><a href="unknown_exception.html">unknown_exception</a></span> as a final fallback. All such types derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, and:<div><ul><li> if the original exception object derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, then the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> sub-object of the object referred to by the returned <span class="RenoLink"><a href="exception_ptr.html">exception_ptr</a></span> is initialized by the boost::<span class="RenoLink"><a href="exception.html">exception</a></span> copy constructor;</li>
<li> if available, the exception contains the std::type_info of the original exception object, accessible through <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>&lt;<span class="RenoLink"><a href="original_exception_type.html">original_exception_type</a></span>&gt;.</li>
</ul></div>
</li>

View File

@ -3,8 +3,8 @@
//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
#ifndef BOOST_EXCEPTION_316FDA946C0D11DEA9CBAE5255D89593
#define BOOST_EXCEPTION_316FDA946C0D11DEA9CBAE5255D89593
#include <boost/config.hpp>
#include <boost/exception/diagnostic_information.hpp>

View File

@ -3,14 +3,20 @@
//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_7E83C166200811DE885E826156D89593
#define UUID_7E83C166200811DE885E826156D89593
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_7E83C166200811DE885E826156D89593
#define BOOST_EXCEPTION_7E83C166200811DE885E826156D89593
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -3,14 +3,20 @@
//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_81522C0EB56511DFAB613DB0DFD72085
#define UUID_81522C0EB56511DFAB613DB0DFD72085
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_81522C0EB56511DFAB613DB0DFD72085
#define BOOST_EXCEPTION_81522C0EB56511DFAB613DB0DFD72085
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
#ifdef BOOST_NO_EXCEPTIONS
# error This header requires exception handling to be enabled.

View File

@ -3,8 +3,8 @@
//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_CE6983AC753411DDA764247956D89593
#define UUID_CE6983AC753411DDA764247956D89593
#ifndef BOOST_EXCEPTION_CE6983AC753411DDA764247956D89593
#define BOOST_EXCEPTION_CE6983AC753411DDA764247956D89593
#include <boost/config.hpp>
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
@ -13,12 +13,17 @@
#include <utility>
#include <string>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -1,10 +1,11 @@
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
//Copyright (c) 2019 Dario Menendez, Banco Santander
//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_618474C2DE1511DEB74A388C56D89593
#define UUID_618474C2DE1511DEB74A388C56D89593
#ifndef BOOST_EXCEPTION_618474C2DE1511DEB74A388C56D89593
#define BOOST_EXCEPTION_618474C2DE1511DEB74A388C56D89593
#include <boost/config.hpp>
#ifdef BOOST_NO_EXCEPTIONS
@ -19,17 +20,23 @@
#include <boost/core/demangle.hpp>
#endif
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include <stdexcept>
#include <new>
#include <ios>
#include <stdlib.h>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost
@ -70,20 +77,22 @@ boost
}
};
template <class E>
inline
exception_ptr
copy_exception( E const & e )
{
E cp = e;
exception_detail::copy_boost_exception(&cp, &e);
return exception_ptr(boost::make_shared<wrapexcept<E> >(cp));
}
template <class T>
inline
exception_ptr
copy_exception( T const & e )
make_exception_ptr( T const & e )
{
try
{
throw enable_current_exception(e);
}
catch(
... )
{
return current_exception();
}
return copy_exception(e);
}
#ifndef BOOST_NO_RTTI
@ -299,6 +308,24 @@ boost
return boost::copy_exception(unknown_exception(e));
}
#ifndef BOOST_NO_CXX11_HDR_EXCEPTION
struct
std_exception_ptr_wrapper
{
std::exception_ptr p;
explicit std_exception_ptr_wrapper( std::exception_ptr const & ptr ) BOOST_NOEXCEPT:
p(ptr)
{
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
explicit std_exception_ptr_wrapper( std::exception_ptr && ptr ) BOOST_NOEXCEPT:
p(static_cast<std::exception_ptr &&>(ptr))
{
}
#endif
};
#endif
inline
exception_ptr
current_exception_impl()
@ -412,11 +439,14 @@ boost
{
return exception_detail::current_exception_std_exception(e);
}
#ifdef BOOST_NO_CXX11_HDR_EXCEPTION
// this case can be handled losslesly with std::current_exception() (see below)
catch(
std::exception & e )
{
return exception_detail::current_exception_unknown_std_exception(e);
}
#endif
catch(
boost::exception & e )
{
@ -425,7 +455,22 @@ boost
catch(
... )
{
#ifndef BOOST_NO_CXX11_HDR_EXCEPTION
try
{
// wrap the std::exception_ptr in a clone-enabled Boost.Exception object
exception_detail::clone_base const & base =
boost::enable_current_exception(std_exception_ptr_wrapper(std::current_exception()));
return exception_ptr(shared_ptr<exception_detail::clone_base const>(base.clone()));
}
catch(
...)
{
return exception_detail::current_exception_unknown_exception();
}
#else
return exception_detail::current_exception_unknown_exception();
#endif
}
}
}
@ -461,7 +506,20 @@ boost
rethrow_exception( exception_ptr const & p )
{
BOOST_ASSERT(p);
#ifndef BOOST_NO_CXX11_HDR_EXCEPTION
try
{
p.ptr_->rethrow();
}
catch(
exception_detail::std_exception_ptr_wrapper const & wrp)
{
// if an std::exception_ptr was wrapped above then rethrow it
std::rethrow_exception(wrp.p);
}
#else
p.ptr_->rethrow();
#endif
BOOST_ASSERT(0);
#if defined(UNDER_CE)
// some CE platforms don't define ::abort()

View File

@ -3,17 +3,22 @@
//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_898984B4076411DD973EDFA055D89593
#define UUID_898984B4076411DD973EDFA055D89593
#ifndef BOOST_EXCEPTION_898984B4076411DD973EDFA055D89593
#define BOOST_EXCEPTION_898984B4076411DD973EDFA055D89593
#include <ostream>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -3,8 +3,8 @@
//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_6F463AC838DF11DDA3E6909F56D89593
#define UUID_6F463AC838DF11DDA3E6909F56D89593
#ifndef BOOST_EXCEPTION_6F463AC838DF11DDA3E6909F56D89593
#define BOOST_EXCEPTION_6F463AC838DF11DDA3E6909F56D89593
#include <boost/exception/detail/type_info.hpp>
#include <iomanip>
@ -13,12 +13,17 @@
#include <sstream>
#include <cstdlib>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -3,8 +3,8 @@
//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
#ifndef BOOST_EXCEPTION_837060E885AF11E68DA91D15E31AC075
#define BOOST_EXCEPTION_837060E885AF11E68DA91D15E31AC075
#ifdef BOOST_EXCEPTION_MINI_BOOST
#include <memory>

View File

@ -3,8 +3,8 @@
//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_C3E1741C754311DDB2834CCA55D89593
#define UUID_C3E1741C754311DDB2834CCA55D89593
#ifndef BOOST_EXCEPTION_C3E1741C754311DDB2834CCA55D89593
#define BOOST_EXCEPTION_C3E1741C754311DDB2834CCA55D89593
#include <boost/config.hpp>
#include <boost/core/typeinfo.hpp>
@ -12,12 +12,17 @@
#include <boost/current_function.hpp>
#include <string>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -3,8 +3,8 @@
//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_0552D49838DD11DD90146B8956D89593
#define UUID_0552D49838DD11DD90146B8956D89593
#ifndef BOOST_EXCEPTION_0552D49838DD11DD90146B8956D89593
#define BOOST_EXCEPTION_0552D49838DD11DD90146B8956D89593
#include <boost/config.hpp>
#include <boost/exception/get_error_info.hpp>
@ -20,12 +20,17 @@
#include <boost/exception/current_exception_cast.hpp>
#endif
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
#ifndef BOOST_NO_EXCEPTIONS
namespace

View File

@ -3,8 +3,8 @@
//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
#ifndef BOOST_EXCEPTION_851700A4F7CF11E6B2EE06DD14915323
#define BOOST_EXCEPTION_851700A4F7CF11E6B2EE06DD14915323
#include <boost/exception/exception.hpp>

View File

@ -3,8 +3,8 @@
//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
#ifndef BOOST_EXCEPTION_A0F7404AF7CF11E6908227DD14915323
#define BOOST_EXCEPTION_A0F7404AF7CF11E6908227DD14915323
#include <boost/exception/exception.hpp>

View File

@ -3,8 +3,8 @@
//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
#ifndef BOOST_EXCEPTION_DDFBB4546C1211DEA4659E9055D89593
#define BOOST_EXCEPTION_DDFBB4546C1211DEA4659E9055D89593
#include <boost/exception/error_info.hpp>

View File

@ -3,8 +3,8 @@
//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
#ifndef BOOST_EXCEPTION_E7255CE26C1211DE85800C9155D89593
#define BOOST_EXCEPTION_E7255CE26C1211DE85800C9155D89593
namespace
boost

View File

@ -3,20 +3,25 @@
//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_F0EE17BE6C1211DE87FF459155D89593
#define UUID_F0EE17BE6C1211DE87FF459155D89593
#ifndef BOOST_EXCEPTION_F0EE17BE6C1211DE87FF459155D89593
#define BOOST_EXCEPTION_F0EE17BE6C1211DE87FF459155D89593
#include <boost/exception/info.hpp>
#include <errno.h>
#include <string.h>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#pragma warning(disable:4996)
#endif
#endif
namespace
boost

View File

@ -3,8 +3,8 @@
//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_F79E6EE26C1211DEB26E929155D89593
#define UUID_F79E6EE26C1211DEB26E929155D89593
#ifndef BOOST_EXCEPTION_F79E6EE26C1211DEB26E929155D89593
#define BOOST_EXCEPTION_F79E6EE26C1211DEB26E929155D89593
#include <stdio.h>

View File

@ -3,8 +3,8 @@
//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_FEE5120A6C1211DE94E8BC9155D89593
#define UUID_FEE5120A6C1211DE94E8BC9155D89593
#ifndef BOOST_EXCEPTION_FEE5120A6C1211DE94E8BC9155D89593
#define BOOST_EXCEPTION_FEE5120A6C1211DE94E8BC9155D89593
#include <string>

View File

@ -3,8 +3,8 @@
//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_056F1F266C1311DE8E74299255D89593
#define UUID_056F1F266C1311DE8E74299255D89593
#ifndef BOOST_EXCEPTION_056F1F266C1311DE8E74299255D89593
#define BOOST_EXCEPTION_056F1F266C1311DE8E74299255D89593
#include <string>

View File

@ -3,8 +3,8 @@
//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_45CC9A82B77511DEB330FC4956D89593
#define UUID_45CC9A82B77511DEB330FC4956D89593
#ifndef BOOST_EXCEPTION_45CC9A82B77511DEB330FC4956D89593
#define BOOST_EXCEPTION_45CC9A82B77511DEB330FC4956D89593
namespace
boost

View File

@ -3,8 +3,8 @@
//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_0E11109E6C1311DEB7EA649255D89593
#define UUID_0E11109E6C1311DEB7EA649255D89593
#ifndef BOOST_EXCEPTION_0E11109E6C1311DEB7EA649255D89593
#define BOOST_EXCEPTION_0E11109E6C1311DEB7EA649255D89593
#include <string>

View File

@ -3,7 +3,7 @@
//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_EE7ECCA0433B11E1923E37064924019B
#define UUID_EE7ECCA0433B11E1923E37064924019B
#ifndef BOOST_EXCEPTION_EE7ECCA0433B11E1923E37064924019B
#define BOOST_EXCEPTION_EE7ECCA0433B11E1923E37064924019B
namespace boost { template <class Tag,class T> class error_info; }
#endif

View File

@ -3,8 +3,8 @@
//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_1A590226753311DD9E4CCF6156D89593
#define UUID_1A590226753311DD9E4CCF6156D89593
#ifndef BOOST_EXCEPTION_1A590226753311DD9E4CCF6156D89593
#define BOOST_EXCEPTION_1A590226753311DD9E4CCF6156D89593
#include <boost/config.hpp>
#include <boost/exception/exception.hpp>
@ -13,12 +13,17 @@
#include <boost/exception/detail/shared_ptr.hpp>
#include <boost/assert.hpp>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -3,8 +3,8 @@
//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_8D22C4CA9CC811DCAA9133D256D89593
#define UUID_8D22C4CA9CC811DCAA9133D256D89593
#ifndef BOOST_EXCEPTION_8D22C4CA9CC811DCAA9133D256D89593
#define BOOST_EXCEPTION_8D22C4CA9CC811DCAA9133D256D89593
#include <boost/config.hpp>
#include <boost/exception/exception.hpp>
@ -13,12 +13,17 @@
#include <boost/exception/detail/shared_ptr.hpp>
#include <map>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost
@ -52,7 +57,7 @@ boost
exception_detail
{
class
error_info_container_impl:
error_info_container_impl BOOST_FINAL:
public error_info_container
{
public:

View File

@ -3,18 +3,23 @@
//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_63EE924290FB11DC87BB856555D89593
#define UUID_63EE924290FB11DC87BB856555D89593
#ifndef BOOST_EXCEPTION_63EE924290FB11DC87BB856555D89593
#define BOOST_EXCEPTION_63EE924290FB11DC87BB856555D89593
#include <boost/exception/info.hpp>
#include <boost/tuple/tuple.hpp>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -3,19 +3,24 @@
//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_7E48761AD92811DC9011477D56D89593
#define UUID_7E48761AD92811DC9011477D56D89593
#ifndef BOOST_EXCEPTION_7E48761AD92811DC9011477D56D89593
#define BOOST_EXCEPTION_7E48761AD92811DC9011477D56D89593
#include <boost/utility/enable_if.hpp>
#include <boost/exception/detail/is_output_streamable.hpp>
#include <sstream>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -3,19 +3,24 @@
//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_E788439ED9F011DCB181F25B55D89593
#define UUID_E788439ED9F011DCB181F25B55D89593
#ifndef BOOST_EXCEPTION_E788439ED9F011DCB181F25B55D89593
#define BOOST_EXCEPTION_E788439ED9F011DCB181F25B55D89593
#include <boost/exception/to_string.hpp>
#include <boost/exception/detail/object_hex_dump.hpp>
#include <boost/assert.hpp>
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
#if __GNUC__*100+__GNUC_MINOR__>301
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#ifdef __clang__
#pragma clang system_header
#endif
#ifdef _MSC_VER
#pragma warning(push,1)
#endif
#endif
namespace
boost

View File

@ -3,8 +3,8 @@
//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_FA5836A2CADA11DC8CD47C8555D89593
#define UUID_FA5836A2CADA11DC8CD47C8555D89593
#ifndef BOOST_EXCEPTION_FA5836A2CADA11DC8CD47C8555D89593
#define BOOST_EXCEPTION_FA5836A2CADA11DC8CD47C8555D89593
#include <boost/exception/detail/exception_ptr.hpp>

View File

@ -5,6 +5,7 @@
#define BOOST_NO_EXCEPTIONS
#include <boost/throw_exception.hpp>
#include <stdlib.h>
class my_exception: public std::exception { };

View File

@ -6,6 +6,7 @@
#define BOOST_NO_EXCEPTIONS
#define BOOST_EXCEPTION_DISABLE
#include <boost/throw_exception.hpp>
#include <stdlib.h>
class my_exception: public std::exception { };

View File

@ -9,6 +9,7 @@
#include <boost/detail/lightweight_test.hpp>
#include <boost/detail/workaround.hpp>
#include <string>
#include <ios>
typedef boost::error_info<struct my_tag,int> my_info;

View File

@ -110,7 +110,7 @@ void
thread_test()
{
boost::thread_group grp;
for( int i=0; i!=50; ++i )
for( int i=0; i!=100; ++i )
grp.create_thread(&consume);
grp.join_all ();
}

View File

@ -8,7 +8,7 @@
#include <boost/detail/lightweight_test.hpp>
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
#if BOOST_WORKAROUND(BOOST_CODEGEARC, BOOST_TESTED_AT(0x610))
struct test_tag1 {};
struct test_tag2 {};
#endif

View File

@ -3,8 +3,8 @@
//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_4AEB7924CA2E11DC888A8C9355D89593
#define UUID_4AEB7924CA2E11DC888A8C9355D89593
#ifndef BOOST_EXCEPTION_4AEB7924CA2E11DC888A8C9355D89593
#define BOOST_EXCEPTION_4AEB7924CA2E11DC888A8C9355D89593
namespace
boost

View File

@ -3,8 +3,8 @@
//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_BC765EB4CA2A11DCBDC5828355D89593
#define UUID_BC765EB4CA2A11DCBDC5828355D89593
#ifndef BOOST_EXCEPTION_BC765EB4CA2A11DCBDC5828355D89593
#define BOOST_EXCEPTION_BC765EB4CA2A11DCBDC5828355D89593
#include <boost/exception/exception.hpp>
#include <exception>

View File

@ -41,6 +41,11 @@ boost
#endif
exit(boost::report_errors());
}
void
throw_exception(std::exception const & x, boost::source_location const &)
{
throw_exception(x);
}
}
int

View File

@ -9,7 +9,7 @@
#include <boost/detail/lightweight_test.hpp>
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
#if BOOST_WORKAROUND(BOOST_CODEGEARC, BOOST_TESTED_AT(0x610))
struct tag_test {};
#endif
@ -38,6 +38,25 @@ throw_unknown_exception()
throw test_exception();
}
struct
user_defined_exception
{
user_defined_exception(int d):data(d){}
int data;
};
void
throw_user_defined_exception()
{
throw user_defined_exception(42);
}
void
throw_builtin_exception()
{
throw 42;
}
int
main()
{
@ -138,5 +157,115 @@ main()
BOOST_TEST(false);
}
}
try
{
throw_user_defined_exception();
}
catch(
... )
{
boost::exception_ptr ep=boost::current_exception();
try
{
rethrow_exception(ep);
}
#ifndef BOOST_NO_CXX11_HDR_EXCEPTION
catch(
user_defined_exception & x)
{
//Yay! std::current_exception to the rescue!
BOOST_TEST( 42==x.data );
}
#else
catch(
boost::unknown_exception & )
{
//Boo! user defined exception was transported as a boost::unknown_exception
}
#endif
catch(
... )
{
BOOST_TEST(false);
}
try
{
rethrow_exception(ep);
}
#ifndef BOOST_NO_CXX11_HDR_EXCEPTION
catch(
user_defined_exception & x)
{
//Yay! std::current_exception to the rescue!
BOOST_TEST( 42==x.data );
}
#else
catch(
boost::unknown_exception & )
{
//Boo! user defined exception was transported as a boost::unknown_exception
}
#endif
catch(
... )
{
BOOST_TEST(false);
}
}
try
{
throw_builtin_exception();
}
catch(
... )
{
boost::exception_ptr ep=boost::current_exception();
try
{
rethrow_exception(ep);
}
#ifndef BOOST_NO_CXX11_HDR_EXCEPTION
catch(
int & x)
{
//Yay! std::current_exception to the rescue!
BOOST_TEST( 42==x );
}
#else
catch(
boost::unknown_exception & )
{
//Boo! builtin exception was transported as a boost::unknown_exception
}
#endif
catch(
... )
{
BOOST_TEST(false);
}
try
{
rethrow_exception(ep);
}
#ifndef BOOST_NO_CXX11_HDR_EXCEPTION
catch(
int & x)
{
//Yay! std::current_exception to the rescue!
BOOST_TEST( 42==x );
}
#else
catch(
boost::unknown_exception & )
{
//Boo! builtin exception was transported as a boost::unknown_exception
}
#endif
catch(
... )
{
BOOST_TEST(false);
}
}
return boost::report_errors();
}