From 6317f864cb0db14fa3f45b30f0adffcaff6a834f Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Tue, 8 Aug 2017 21:34:58 +0200 Subject: [PATCH] rethrow exceptions thrown by pull-coroutine ctor --- .../boost/coroutine2/detail/pull_control_block_cc.ipp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/coroutine2/detail/pull_control_block_cc.ipp b/include/boost/coroutine2/detail/pull_control_block_cc.ipp index 4868334..a7dd68e 100644 --- a/include/boost/coroutine2/detail/pull_control_block_cc.ipp +++ b/include/boost/coroutine2/detail/pull_control_block_cc.ipp @@ -103,6 +103,9 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc, return other->c.resume(); }); #endif + if ( except) { + std::rethrow_exception( except); + } } template< typename T > @@ -250,6 +253,9 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo return other->c.resume(); }); #endif + if ( except) { + std::rethrow_exception( except); + } } template< typename T > @@ -371,6 +377,9 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall return other->c.resume(); }); #endif + if ( except) { + std::rethrow_exception( except); + } } inline