mirror of
https://github.com/boostorg/coroutine.git
synced 2026-02-09 23:12:42 +00:00
call std::terminate() if coroutine-fn throws an excpetion
This commit is contained in:
@@ -46,7 +46,6 @@ private:
|
||||
typedef parameters< R > param_type;
|
||||
|
||||
int flags_;
|
||||
exception_ptr except_;
|
||||
coroutine_context * caller_;
|
||||
coroutine_context * callee_;
|
||||
|
||||
@@ -56,7 +55,6 @@ private:
|
||||
* callee_,
|
||||
reinterpret_cast< intptr_t >( to),
|
||||
preserve_fpu() );
|
||||
if ( except_) rethrow_exception( except_);
|
||||
}
|
||||
|
||||
template< typename Other >
|
||||
@@ -78,7 +76,6 @@ public:
|
||||
coroutine_context * callee,
|
||||
bool unwind, bool preserve_fpu) :
|
||||
flags_( 0),
|
||||
except_(),
|
||||
caller_( caller),
|
||||
callee_( callee)
|
||||
{
|
||||
@@ -199,7 +196,6 @@ private:
|
||||
typedef parameters< R & > param_type;
|
||||
|
||||
int flags_;
|
||||
exception_ptr except_;
|
||||
coroutine_context * caller_;
|
||||
coroutine_context * callee_;
|
||||
|
||||
@@ -209,7 +205,6 @@ private:
|
||||
* callee_,
|
||||
reinterpret_cast< intptr_t >( to),
|
||||
preserve_fpu() );
|
||||
if ( except_) rethrow_exception( except_);
|
||||
}
|
||||
|
||||
template< typename Other >
|
||||
@@ -231,7 +226,6 @@ public:
|
||||
coroutine_context * callee,
|
||||
bool unwind, bool preserve_fpu) :
|
||||
flags_( 0),
|
||||
except_(),
|
||||
caller_( caller),
|
||||
callee_( callee)
|
||||
{
|
||||
@@ -344,7 +338,6 @@ private:
|
||||
typedef parameters< void > param_type;
|
||||
|
||||
int flags_;
|
||||
exception_ptr except_;
|
||||
coroutine_context * caller_;
|
||||
coroutine_context * callee_;
|
||||
|
||||
@@ -366,7 +359,6 @@ public:
|
||||
coroutine_context * callee,
|
||||
bool unwind, bool preserve_fpu) :
|
||||
flags_( 0),
|
||||
except_(),
|
||||
caller_( caller),
|
||||
callee_( callee)
|
||||
{
|
||||
@@ -411,7 +403,6 @@ public:
|
||||
* callee_,
|
||||
reinterpret_cast< intptr_t >( & to),
|
||||
preserve_fpu() );
|
||||
if ( except_) rethrow_exception( except_);
|
||||
}
|
||||
|
||||
template< typename X >
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define BOOST_COROUTINES_DETAIL_TRAMPOLINE_H
|
||||
|
||||
#include <cstddef>
|
||||
#include <exception>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
@@ -66,7 +67,7 @@ void trampoline( intptr_t vp)
|
||||
catch ( forced_unwind const&)
|
||||
{}
|
||||
catch (...)
|
||||
{ c.except_ = current_exception(); }
|
||||
{ std::terminate(); }
|
||||
}
|
||||
|
||||
c.flags_ |= flag_complete;
|
||||
@@ -107,7 +108,7 @@ void trampoline_void( intptr_t vp)
|
||||
catch ( forced_unwind const&)
|
||||
{}
|
||||
catch (...)
|
||||
{ c.except_ = current_exception(); }
|
||||
{ std::terminate(); }
|
||||
}
|
||||
|
||||
c.flags_ |= flag_complete;
|
||||
|
||||
Reference in New Issue
Block a user