Boost logo

Boost Users :

Subject: Re: [Boost-users] [coroutine] - only std exceptions are caught from coroutines
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2016-02-20 23:37:56


On Sat, Feb 20, 2016 at 2:44 AM, Oliver Kowalke <oliver.kowalke_at_[hidden]>
wrote:

> 2016-02-19 22:10 GMT+01:00 Emil Dotchevski <emildotchevski_at_[hidden]>:
>
>> boost::exception_ptr requires that the exception is thrown using
>> enable_current_exception, see
>> www.boost.org/doc/libs/release/libs/exception/doc/enable_current_exception.html.
>> I recommend to throw the exception using BOOST_THROW_EXCEPTION, which
>> internally uses enable_current_exception.
>>
>
> the code looks like this
>
> boost::exception_ptr except_;
> ...
> if ( except_) boost::rethrow_exception( except_);
>

I mean the original exception emitted by the coroutine should be thrown
using BOOST_THROW_EXCEPTION.

Emil



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net