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.