Skip to content

Commit

Permalink
constify missing catch cases
Browse files Browse the repository at this point in the history
- ensure all missing catch cases are constant where possible
  • Loading branch information
Philip Kaufmann committed Oct 27, 2015
1 parent 8f3b3cd commit ad5aae1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static bool AppInitRPC(int argc, char* argv[])
// Check for -testnet or -regtest parameter (BaseParams() calls are only valid after this clause)
try {
SelectBaseParams(ChainNameFromCommandLine());
} catch(std::exception &e) {
} catch (const std::exception& e) {
fprintf(stderr, "Error: %s\n", e.what());
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static bool AppInitRawTx(int argc, char* argv[])
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
try {
SelectParams(ChainNameFromCommandLine());
} catch(std::exception &e) {
} catch (const std::exception& e) {
fprintf(stderr, "Error: %s\n", e.what());
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ bool AppInit(int argc, char* argv[])
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
try {
SelectParams(ChainNameFromCommandLine());
} catch(std::exception &e) {
} catch (const std::exception& e) {
fprintf(stderr, "Error: %s\n", e.what());
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/dbwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class CDBIterator
try {
CDataStream ssKey(slKey.data(), slKey.data() + slKey.size(), SER_DISK, CLIENT_VERSION);
ssKey >> key;
} catch(std::exception &e) {
} catch (const std::exception&) {
return false;
}
return true;
Expand All @@ -120,7 +120,7 @@ class CDBIterator
CDataStream ssValue(slValue.data(), slValue.data() + slValue.size(), SER_DISK, CLIENT_VERSION);
ssValue.Xor(*obfuscate_key);
ssValue >> value;
} catch(std::exception &e) {
} catch (const std::exception&) {
return false;
}
return true;
Expand Down

0 comments on commit ad5aae1

Please sign in to comment.