Commit Graph

41 Commits

Author SHA1 Message Date
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
d3c27315d1 Fixing compile error due to __LINE__ not always being compile-time constant on MSVC
[SVN r60159]
2010-03-05 00:05:43 +00:00
2f18eef27a copy_exception ambiguity problem with c++0x
[SVN r59465]
2010-02-04 08:14:27 +00:00
2bbd6ae7b5 trying workaround for failures at Sandia-gcc-4.4.3_0x
[SVN r59436]
2010-02-03 08:24:01 +00:00
3013e991f1 exception_ptr bad_alloc refactoring
[SVN r59431]
2010-02-02 19:41:55 +00:00
4ae002cbf8 Ticket #3848 (thanks Nikki Chumakov) and (unrelated) exception_ptr refactoring.
[SVN r59364]
2010-01-30 05:26:43 +00:00
9d499676ae Simplified type_info support due to improvements in boost/detail/sp_typeinfo.hpp. A few tweaks to better deal with warnings.
[SVN r58132]
2009-12-04 06:33:47 +00:00
58a49ff77e minor diagnostic_information maintenance, updated documentation
[SVN r58131]
2009-12-04 01:29:22 +00:00
8d24c87032 Suppressing warnings. Please report any problems (may have broken something!)
[SVN r58072]
2009-12-01 02:16:50 +00:00