bug #245 exception seen in witness logs
This commit is contained in:
parent
10799a2148
commit
78fbf7c3cd
2 changed files with 136 additions and 112 deletions
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <boost/exception/diagnostic_information.hpp>
|
||||||
#include <fc/exception/exception.hpp>
|
#include <fc/exception/exception.hpp>
|
||||||
#include <graphene/chain/protocol/protocol.hpp>
|
#include <graphene/chain/protocol/protocol.hpp>
|
||||||
|
|
||||||
|
|
@ -75,6 +76,14 @@
|
||||||
elog( "Caught plugin exception: ${e}", ("e", e.to_detail_string() ) ); \
|
elog( "Caught plugin exception: ${e}", ("e", e.to_detail_string() ) ); \
|
||||||
throw; \
|
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( ... ) \
|
catch( ... ) \
|
||||||
{ \
|
{ \
|
||||||
wlog( "Caught unexpected exception in plugin" ); \
|
wlog( "Caught unexpected exception in plugin" ); \
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,8 @@ account_history_plugin_impl::~account_history_plugin_impl()
|
||||||
|
|
||||||
void account_history_plugin_impl::update_account_histories( const signed_block& b )
|
void account_history_plugin_impl::update_account_histories( const signed_block& b )
|
||||||
{
|
{
|
||||||
|
try \
|
||||||
|
{
|
||||||
graphene::chain::database& db = database();
|
graphene::chain::database& db = database();
|
||||||
vector<optional< operation_history_object > >& hist = db.get_applied_operations();
|
vector<optional< operation_history_object > >& hist = db.get_applied_operations();
|
||||||
bool is_first = true;
|
bool is_first = true;
|
||||||
|
|
@ -197,6 +199,19 @@ void account_history_plugin_impl::update_account_histories( const signed_block&
|
||||||
if (_partial_operations && ! oho.valid())
|
if (_partial_operations && ! oho.valid())
|
||||||
skip_oho_id();
|
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 )
|
void account_history_plugin_impl::add_account_history( const account_id_type account_id, const operation_history_id_type op_id )
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue