Boost logo

Boost Users :

Subject: Re: [Boost-users] State of context and coroutine
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-07-06 02:49:08


On 6/07/2016 17:40, Oliver Kowalke wrote:
> b) the exception is defined in the detail namespace. That means, one
> has to use a detail-member to rethrow the one exception that has to
> leave the coroutine client entry function.
>
> do not absorb exception detail::forced_unwind, e.g. do not use 'catch(...)'

It might be worthwhile mentioning in the docs that detail::forced_unwind
is *not* derived from std::exception. (This is not currently obvious
unless you look at the library code.)

This means that code that uses "catch (const std::exception& e)" to
catch all normal exceptions (rather than "catch(...)") will not catch
forced_unwind and so doesn't need to be specially conditioned to rethrow
it, and consequently doesn't need to know about the detail namespace.


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