Merge branch 'bug/245-exception-in-witness' into 'develop'

bug #245 exception seen in witness logs

See merge request PBSA/peerplays!56
This commit is contained in:
serkixenos 2022-01-31 14:14:25 +00:00
commit 66699f1e15
2 changed files with 136 additions and 112 deletions

View file

@ -23,6 +23,7 @@
*/
#pragma once
#include <boost/exception/diagnostic_information.hpp>
#include <fc/exception/exception.hpp>
#include <graphene/chain/protocol/protocol.hpp>
@ -75,6 +76,14 @@
elog( "Caught plugin exception: ${e}", ("e", e.to_detail_string() ) ); \
throw; \
} \
catch( const boost::exception& e ) \
{ \
elog( "Caught plugin boost::exception: ${e}", ("e", boost::diagnostic_information(e) ) ); \
} \
catch( const std::exception& e ) \
{ \
elog( "Caught plugin std::exception: ${e}", ("e", e.what() ) ); \
} \
catch( ... ) \
{ \
wlog( "Caught unexpected exception in plugin" ); \

View file

@ -78,6 +78,8 @@ account_history_plugin_impl::~account_history_plugin_impl()
}
void account_history_plugin_impl::update_account_histories( const signed_block& b )
{
try \
{
graphene::chain::database& db = database();
vector<optional< operation_history_object > >& hist = db.get_applied_operations();
@ -198,6 +200,19 @@ void account_history_plugin_impl::update_account_histories( const signed_block&
skip_oho_id();
}
}
catch( const boost::exception& e )
{
elog( "Caught account_history_plugin::update_account_histories(...) boost::exception: ${e}", ("e", boost::diagnostic_information(e) ) );
}
catch( const std::exception& e )
{
elog( "Caught account_history_plugin::update_account_histories(...) std::exception: ${e}", ("e", e.what() ) );
}
catch( ... )
{
wlog( "Caught unexpected exception in account_history_plugin::update_account_histories(...)" );
}
}
void account_history_plugin_impl::add_account_history( const account_id_type account_id, const operation_history_id_type op_id )
{