diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-03-18 20:30:19 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-03-18 20:30:19 +0200 |
commit | f33a696ec7de8dbadcc65cbed4bcb1ef7b720609 (patch) | |
tree | e81c162369e84bf36f95db167238fa2d8dc171d3 /src/wallet | |
parent | Merge pull request #1882 (diff) | |
parent | use const references in catch blocks (diff) | |
download | monero-f33a696ec7de8dbadcc65cbed4bcb1ef7b720609.tar.xz |
Merge pull request #1883
d0238313 use const references in catch blocks (moneromooo-monero)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/api/pending_transaction.cpp | 2 | ||||
-rw-r--r-- | src/wallet/api/wallet.cpp | 2 | ||||
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp index 60edc95ce..9798d66c6 100644 --- a/src/wallet/api/pending_transaction.cpp +++ b/src/wallet/api/pending_transaction.cpp @@ -124,7 +124,7 @@ bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite) m_errorString = writer.str(); if (!reason.empty()) m_errorString += string(tr(". Reason: ")) + reason; - } catch (std::exception &e) { + } catch (const std::exception &e) { m_errorString = string(tr("Unknown exception: ")) + e.what(); m_status = Status_Error; } catch (...) { diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 963bbe0ab..d5c2fbda2 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -833,7 +833,7 @@ bool WalletImpl::exportKeyImages(const string &filename) return false; } } - catch (std::exception &e) + catch (const std::exception &e) { LOG_ERROR("Error exporting key images: " << e.what()); m_errorString = e.what(); diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index b07e413a4..9002048c8 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -252,7 +252,7 @@ namespace tools res.balance = m_wallet.balance(); res.unlocked_balance = m_wallet.unlocked_balance(); } - catch (std::exception& e) + catch (const std::exception& e) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; er.message = e.what(); @@ -267,7 +267,7 @@ namespace tools { res.address = m_wallet.get_account().get_public_address_str(m_wallet.testnet()); } - catch (std::exception& e) + catch (const std::exception& e) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; er.message = e.what(); @@ -282,7 +282,7 @@ namespace tools { res.height = m_wallet.get_blockchain_current_height(); } - catch (std::exception& e) + catch (const std::exception& e) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; er.message = e.what(); @@ -636,7 +636,7 @@ namespace tools res.payment_id = epee::string_tools::pod_to_hex(payment_id); return true; } - catch (std::exception &e) + catch (const std::exception &e) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; er.message = e.what(); @@ -669,7 +669,7 @@ namespace tools res.payment_id = epee::string_tools::pod_to_hex(payment_id); return true; } - catch (std::exception &e) + catch (const std::exception &e) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; er.message = e.what(); @@ -691,7 +691,7 @@ namespace tools { m_wallet.store(); } - catch (std::exception& e) + catch (const std::exception& e) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; er.message = e.what(); @@ -911,7 +911,7 @@ namespace tools { m_wallet.rescan_blockchain(); } - catch (std::exception& e) + catch (const std::exception& e) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; er.message = e.what(); @@ -970,7 +970,7 @@ namespace tools m_wallet.store(); m_stop.store(true, std::memory_order_relaxed); } - catch (std::exception& e) + catch (const std::exception& e) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; er.message = e.what(); |