mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
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:
@@ -129,7 +129,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) const {
|
||||
ss << VARINT(0);
|
||||
}
|
||||
pcursor->Next();
|
||||
} catch (std::exception &e) {
|
||||
} catch (const std::exception& e) {
|
||||
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
|
||||
}
|
||||
}
|
||||
@@ -218,7 +218,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
|
||||
} else {
|
||||
break; // if shutdown requested or finished loading block index
|
||||
}
|
||||
} catch (std::exception &e) {
|
||||
} catch (const std::exception& e) {
|
||||
return error("%s : Deserialize or I/O error - %s", __func__, e.what());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user