From 8982b69aabfefd65e8f3d859018228998f523cae Mon Sep 17 00:00:00 2001 From: svost Date: Wed, 30 Mar 2016 23:05:23 +0300 Subject: [PATCH] Get rid of 'e': all unused --- src/db.h | 3 +-- src/init.cpp | 3 +-- src/main.h | 6 ++---- src/qt/multisigdialog.cpp | 9 +++------ src/txdb-leveldb.h | 3 +-- src/walletdb.cpp | 2 +- 6 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/db.h b/src/db.h index 993b7a7..07bb2b0 100644 --- a/src/db.h +++ b/src/db.h @@ -137,8 +137,7 @@ protected: CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK, CLIENT_VERSION); ssValue >> value; } - catch (std::exception &e) { - (void)e; + catch (const std::exception&) { return false; } diff --git a/src/init.cpp b/src/init.cpp index 1e0daaa..01900a5 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -780,8 +780,7 @@ bool AppInit2() strLoadError = _("Error loading block database"); break; } - } catch(std::exception &e) { - (void)e; + } catch(const std::exception&) { strLoadError = _("Error opening block database"); break; } diff --git a/src/main.h b/src/main.h index 63884b2..df49707 100644 --- a/src/main.h +++ b/src/main.h @@ -620,8 +620,7 @@ public: try { filein >> *this; } - catch (std::exception &e) { - (void)e; + catch (const std::exception&) { return error("%s() : deserialize or I/O error", BOOST_CURRENT_FUNCTION); } @@ -1096,8 +1095,7 @@ public: try { filein >> *this; } - catch (std::exception &e) { - (void)e; + catch (const std::exception&) { return error("%s() : deserialize or I/O error", BOOST_CURRENT_FUNCTION); } diff --git a/src/qt/multisigdialog.cpp b/src/qt/multisigdialog.cpp index 97e49cf..c804c99 100644 --- a/src/qt/multisigdialog.cpp +++ b/src/qt/multisigdialog.cpp @@ -347,9 +347,8 @@ void MultisigDialog::on_transaction_textChanged() { ss >> tx; } - catch(std::exception &e) + catch(const std::exception&) { - (void)e; return; } @@ -418,9 +417,8 @@ void MultisigDialog::on_signTransactionButton_clicked() { ss >> tx; } - catch(std::exception &e) + catch(const std::exception&) { - (void)e; return; } CTransaction mergedTx(tx); @@ -538,9 +536,8 @@ void MultisigDialog::on_sendTransactionButton_clicked() { ssData >> tx; } - catch(std::exception &e) + catch(const std::exception&) { - (void)e; return; } uint256 txHash = tx.GetHash(); diff --git a/src/txdb-leveldb.h b/src/txdb-leveldb.h index c73dda6..07c7088 100644 --- a/src/txdb-leveldb.h +++ b/src/txdb-leveldb.h @@ -91,8 +91,7 @@ protected: SER_DISK, CLIENT_VERSION); ssValue >> value; } - catch (std::exception &e) { - (void)e; + catch (const std::exception&) { return false; } return true; diff --git a/src/walletdb.cpp b/src/walletdb.cpp index ab85b07..3880a93 100644 --- a/src/walletdb.cpp +++ b/src/walletdb.cpp @@ -654,7 +654,7 @@ DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector& vTxHash) } pcursor->close(); } - catch (boost::thread_interrupted) { + catch (const boost::thread_interrupted&) { throw; } catch (...) { -- 1.7.1