From d0238313278206e505473cef4d4bed88b75b96fd Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 18 Mar 2017 12:56:07 +0000 Subject: use const references in catch blocks --- src/wallet/api/pending_transaction.cpp | 2 +- src/wallet/api/wallet.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wallet/api') 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(); -- cgit v1.2.3