Skip to content

Commit

Permalink
GH-946 Let controller_emit_signal_exception escape push_transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Oct 25, 2024
1 parent 4d876e2 commit 87dda6b
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3137,14 +3137,17 @@ struct controller_impl {
} catch( const protocol_feature_bad_block_exception& ) {
throw;
} catch ( const std::bad_alloc& ) {
throw;
throw;
} catch ( const boost::interprocess::bad_alloc& ) {
throw;
throw;
} catch ( const controller_emit_signal_exception& e ) {
wlog( "on block transaction failed due to controller_emit_signal_exception: ${e}", ("e", e.to_detail_string()) );
throw;
} catch (const fc::exception& e) {
handle_exception(e);
handle_exception(e);
} catch (const std::exception& e) {
auto wrapper = fc::std_exception_wrapper::from_current_exception(e);
handle_exception(wrapper);
auto wrapper = fc::std_exception_wrapper::from_current_exception(e);
handle_exception(wrapper);
}

// this code is hit if an exception was thrown, and handled by `handle_exception`
Expand Down Expand Up @@ -3325,6 +3328,9 @@ struct controller_impl {
} catch( const boost::interprocess::bad_alloc& e ) {
elog( "on block transaction failed due to a bad allocation" );
throw;
} catch ( const controller_emit_signal_exception& e ) {
wlog( "on block transaction failed due to controller_emit_signal_exception: ${e}", ("e", e.to_detail_string()) );
throw;
} catch( const fc::exception& e ) {
wlog( "on block transaction failed, but shouldn't impact block generation, system contract needs update" );
edump((e.to_detail_string()));
Expand Down

0 comments on commit 87dda6b

Please sign in to comment.