Commit Graph

58 Commits

Author SHA1 Message Date
b9170a02f1 cxx03 deprecated 2024-01-28 16:37:40 -08:00
ad15fefae7 Avoid -Wundef warnings 2024-01-06 16:30:15 +02:00
11f102a987 Revert "Don't double-rethrow std::exception_ptr (#53)"
This reverts commit ea70868a45.
2023-08-06 15:20:29 -07:00
ea70868a45 Don't double-rethrow std::exception_ptr (#53)
It's unnecessary to throw and then rethrow std::exception_ptr, just derive clone_base separately.

nb. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110835
2023-08-04 18:28:03 -07:00
b039b4ea18 Issue #49 2022-12-16 16:14:39 -08:00
e2faee265d Merge pull request #43 from boostorg/pr/current-exception
Prefer using std::current_exception when available
2022-01-25 19:40:04 -08:00
eafe6dbd5c Prefer using std::current_exception when available (refs #42) 2022-01-26 01:12:54 +02:00
0d205cd71f Use enable_current_exception instead of wrapexcept in copy_exception 2022-01-25 19:54:15 +02:00
1ed2045e07 Made std_exception_ptr_wrapper compatible with boost::throw_exception. 2021-09-30 19:28:36 -07:00
c5367711b7 exception_ptr ctor for std::exception_ptr 2021-09-29 22:25:22 -07:00
c445901088 GHA CI 2020-12-22 17:26:53 -08:00
6a32b36566 Qualify call to copy_exception, because msvc-10.0 has std::copy_exception 2020-12-19 14:50:51 +02:00
9bd0584aa9 Fixed multi-thread bug introduced by the previous change to copy_exception. 2020-08-14 19:42:29 -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
ff0bcc1d85 Added #pragma clang system_header 2020-04-06 18:23:52 -07:00
9197b6a880 Updated copyright message 2020-02-17 18:57:47 -08:00
93692697ef Fixing MSVC-11 compilation error, thanks Lastique 2020-02-09 16:52:49 -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
8e61e8e9fd #include guards prefixed with BOOST_EXCEPTION_ 2019-12-21 14:15:17 -08:00
607268dd8e Replaced throw() with BOOST_NOEXCEPT_OR_NOTHROW
With throw(), Visual Studio 2017 emitted a warning "C26439 SPECIAL_NOEXCEPT". Reproducible at least if code analysis was set to level: "Microsoft Native Recommended Rules".

https://docs.microsoft.com/en-us/visualstudio/code-quality/c26439?view=vs-2017
2019-01-28 09:48:53 +02:00
32d831c4b2 restoring non-intrusive exception_ptr code 2017-04-23 17:58:28 -07:00
cf05dc079b Removing non-intrusive exception_ptr support. 2017-03-13 15:07:09 -07:00
0eee187876 #include config before anything else 2017-02-20 18:23:36 -08:00
5dea76a301 Port to Boost.Core demangle() and typeinfo. 2014-06-11 22:02:59 +04:00
8931eb2e0d Merge pull request #1 from Lastique/develop
Re-enable type name demangling (thanks Lastique)
2014-06-04 23:29:56 -07:00
73c3cb7e46 Switch to BOOST_NORETURN macro
Switch to BOOST_NORETURN macro provided by Boost.Config.
2014-06-05 01:30:40 +04:00
a129725e3e Switched from BOOST_ATTRIBUTE_NORETURN to BOOST_NORETURN. 2014-06-05 00:50:04 +04:00
4edba2f8be Revert "Exception: Remove obsolete GCC version checks."
This reverts commit b2221bf92d.
2014-06-03 02:15:11 +03:00
8f097eb241 Comment fix. 2014-05-31 21:57:51 +04:00
7062572c8f Re-implemented type name demangling.
The new implementation does not depend on Boost.Units and is fully contained in Boost.Exception.
2014-05-31 21:54:52 +04:00
b2221bf92d Exception: Remove obsolete GCC version checks.
[SVN r86074]
2013-09-30 16:01:02 +00:00
432b3090fe Disabled demangling for now, to break the dependency: Exeception -> Units -> Algorithms -> Range -> Concepts. UGH!
[SVN r85782]
2013-09-19 05:53:38 +00:00
ac5ebbcd45 Ticket #8947, thanks Maciej Florek
[SVN r85635]
2013-09-10 05:44:02 +00:00
2a68f099bf Ticket 9069, thanks sarum9in
[SVN r85634]
2013-09-10 05:05:41 +00:00
9b100b0c9d Added verbose parameter to boost::diagnostic_information.
[SVN r82179]
2012-12-23 03:31:48 +00:00
2ebfd49b4f Ticket #7094, thanks 1czajnik
[SVN r79398]
2012-07-10 03:43:13 +00:00
886e9ee793 Removing tabs.
[SVN r79014]
2012-06-20 05:08:25 +00:00
b3640aa019 For Windows CE, rethrow_exception should use ::exit instead of ::abort (the CRT on Windows CE does not include ::abort).
[SVN r78187]
2012-04-25 03:54:37 +00:00
41ce8a3322 This should take care of #6349. Hopefully doesn't break some other configurations.
[SVN r77593]
2012-03-27 19:33:22 +00:00
32e2b33250 Fixing two issues with non-intrusive exception cloning support.
[SVN r72924]
2011-07-05 23:53:33 +00:00
5f6812b226 Hopefully fixing a GCC warning.
[SVN r72127]
2011-05-23 19:34:44 +00:00
a74d041bd5 Ticket 4282
[SVN r68794]
2011-02-12 00:09:06 +00:00
6b0bfad6bf Converted exception_ptr from a shared_ptr typedef to a stand-alone class to allow simpler declaration of namespace boost { class exception_ptr; }
[SVN r68202]
2011-01-17 07:01:35 +00:00
56ae4311bb default gcc visibility for exception types, <link>static requirement in test Jamfile.
[SVN r65763]
2010-10-05 15:04:50 +00:00
12903d4e49 cosmetic bug fix in the exception_ptr support when the attempt to copy the exception object throws.
[SVN r65205]
2010-09-03 02:24:45 +00:00
3b4cdfce47 Non-intrusive exception_ptr support for msvc 7.1/8.0/9.0 (thanks Anthony Williams)
[SVN r65204]
2010-09-03 02:03:15 +00:00
17304c365c non-intrusive exception_ptr support for msvc 7.1 and 8.0 (for now) thanks Anthony Williams
[SVN r65159]
2010-09-01 06:05:11 +00:00
787fb1f148 Fixing https://svn.boost.org/trac/boost/ticket/4210
[SVN r61938]
2010-05-12 23:36:29 +00:00