From 27df4123c433e5ad4e5592f0a8fbc40ca933865b Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sun, 7 Dec 2014 13:29:06 +0100 Subject: make all catch() arguments const - I saw this on http://en.cppreference.com/w/cpp/language/try_catch and thought it would be a good idea - also unify used format to better be able to search for exception uses in our codebase --- src/walletdb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/walletdb.cpp') diff --git a/src/walletdb.cpp b/src/walletdb.cpp index ffddd8106b..94e17c6a58 100644 --- a/src/walletdb.cpp +++ b/src/walletdb.cpp @@ -460,7 +460,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, { ssValue >> hash; } - catch(...){} + catch (...) {} bool fSkipCheck = false; @@ -664,7 +664,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) } pcursor->close(); } - catch (boost::thread_interrupted) { + catch (const boost::thread_interrupted&) { throw; } catch (...) { @@ -757,7 +757,7 @@ DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector& vTxHash, vec } pcursor->close(); } - catch (boost::thread_interrupted) { + catch (const boost::thread_interrupted&) { throw; } catch (...) { @@ -878,7 +878,7 @@ bool BackupWallet(const CWallet& wallet, const string& strDest) #endif LogPrintf("copied wallet.dat to %s\n", pathDest.string()); return true; - } catch(const filesystem::filesystem_error &e) { + } catch (const filesystem::filesystem_error& e) { LogPrintf("error copying wallet.dat to %s - %s\n", pathDest.string(), e.what()); return false; } -- cgit v1.2.3