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
This commit is contained in:
Philip Kaufmann
2014-12-07 13:29:06 +01:00
parent 851dfc7f88
commit 27df4123c4
24 changed files with 78 additions and 82 deletions

View File

@@ -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<uint256>& 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;
}