From 17246d051dbdaf8e4ecb64d1c27a09c49aba5a99 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 20 Jan 2017 17:46:14 +0000 Subject: [PATCH] wallet: print exception message on get_random_outs_error --- src/simplewallet/simplewallet.cpp | 16 ++++++++-------- src/wallet/api/wallet.cpp | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 68781dd7390..4134277d79d 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -2317,9 +2317,9 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector &args_) LOG_ERROR("RPC error: " << e.to_string()); fail_msg_writer() << tr("RPC error: ") << e.what(); } - catch (const tools::error::get_random_outs_error&) + catch (const tools::error::get_random_outs_error &e) { - fail_msg_writer() << tr("failed to get random outputs to mix"); + fail_msg_writer() << tr("failed to get random outputs to mix: ") << e.what(); } catch (const tools::error::not_enough_money& e) { @@ -2756,9 +2756,9 @@ bool simple_wallet::sweep_all(const std::vector &args_) LOG_ERROR("RPC error: " << e.to_string()); fail_msg_writer() << tr("RPC error: ") << e.what(); } - catch (const tools::error::get_random_outs_error&) + catch (const tools::error::get_random_outs_error &e) { - fail_msg_writer() << tr("failed to get random outputs to mix"); + fail_msg_writer() << tr("failed to get random outputs to mix: ") << e.what(); } catch (const tools::error::not_enough_money& e) { @@ -3041,9 +3041,9 @@ bool simple_wallet::submit_transfer(const std::vector &args_) LOG_ERROR("Unknown RPC error: " << e.to_string()); fail_msg_writer() << tr("RPC error: ") << e.what(); } - catch (const tools::error::get_random_outs_error&) + catch (const tools::error::get_random_outs_error &e) { - fail_msg_writer() << tr("failed to get random outputs to mix"); + fail_msg_writer() << tr("failed to get random outputs to mix: ") << e.what(); } catch (const tools::error::not_enough_money& e) { diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 5f7d8e5220d..52ecc2e6afb 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -834,8 +834,8 @@ PendingTransaction *WalletImpl::createTransaction(const string &dst_addr, const } catch (const tools::error::wallet_rpc_error& e) { m_errorString = tr("RPC error: ") + e.to_string(); m_status = Status_Error; - } catch (const tools::error::get_random_outs_error&) { - m_errorString = tr("failed to get random outputs to mix"); + } catch (const tools::error::get_random_outs_error &e) { + m_errorString = (boost::format(tr("failed to get random outputs to mix: %s")) % e.what()).str(); m_status = Status_Error; } catch (const tools::error::not_enough_money& e) {