Skip to content

Commit

Permalink
Handle non-fc exceptions in broadcast_transaction_synchronous steemit…
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandeberg committed Feb 27, 2018
1 parent feab71b commit ac22965
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ namespace detail

throw e;
}
catch( ... )
{
boost::lock_guard< boost::mutex > guard( _mtx );

// The callback may have been cleared in the meantine, so we need to check for existence.
auto c_itr = _callbacks.find( txid );
if( c_itr != _callbacks.end() ) _callbacks.erase( c_itr );

throw fc::unhandled_exception(
FC_LOG_MESSAGE( warn, "Unknown error occured when pushing transaction" ),
std::current_exception() );
}

return p.get_future().get();
}
Expand Down

0 comments on commit ac22965

Please sign in to comment.