Browse Source

constify missing catch cases

- ensure all missing catch cases are constant where possible
pull/1/head
Philip Kaufmann 7 years ago
parent
commit
ad5aae15b4
  1. 2
      src/bitcoin-cli.cpp
  2. 2
      src/bitcoin-tx.cpp
  3. 2
      src/bitcoind.cpp
  4. 4
      src/dbwrapper.h

2
src/bitcoin-cli.cpp

@ -94,7 +94,7 @@ static bool AppInitRPC(int argc, char* argv[]) @@ -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;
}

2
src/bitcoin-tx.cpp

@ -37,7 +37,7 @@ static bool AppInitRawTx(int argc, char* argv[]) @@ -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;
}

2
src/bitcoind.cpp

@ -109,7 +109,7 @@ bool AppInit(int argc, char* argv[]) @@ -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;
}

4
src/dbwrapper.h

@ -104,7 +104,7 @@ public: @@ -104,7 +104,7 @@ public:
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;
@ -120,7 +120,7 @@ public: @@ -120,7 +120,7 @@ public:
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;

Loading…
Cancel
Save