adding extra checks for yielding while processing a catch

This commit is contained in:
Daniel Larimer 2015-10-05 08:44:24 -04:00
parent 83a9e4d7c8
commit 6872112ab0

View file

@ -665,6 +665,9 @@ namespace fc {
if( tp <= (time_point::now()+fc::microseconds(10000)) )
return;
FC_ASSERT(std::current_exception() == std::exception_ptr(),
"Attempting to yield while processing an exception");
if( !current )
current = new fc::context(&fc::thread::current());
@ -698,6 +701,9 @@ namespace fc {
if( p->ready() )
return;
FC_ASSERT(std::current_exception() == std::exception_ptr(),
"Attempting to yield while processing an exception");
if( timeout < time_point::now() )
FC_THROW_EXCEPTION( timeout_exception, "" );