From 250254c338e3db88f8c6895f37e253d0384c6408 Mon Sep 17 00:00:00 2001 From: Sammy Libre Date: Sat, 1 Nov 2014 11:30:53 +0500 Subject: [PATCH] Exception handling while refreshing in rpc wallet (credits to QCN) --- src/wallet/wallet_rpc_server.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 995e97ede..66cf64166 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -58,7 +58,11 @@ namespace tools bool wallet_rpc_server::run() { m_net_server.add_idle_handler([this](){ - m_wallet.refresh(); + try { + m_wallet.refresh(); + } catch (const std::exception& ex) { + LOG_ERROR("Exception at while refreshing, what=" << ex.what()); + } return true; }, 20000);