diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-05-27 09:01:44 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-05-27 09:01:46 -0400 |
commit | 76e2cded477bc483ec610212bdadf21fe35292d4 (patch) | |
tree | 1079dae4145de0b83a06525ed9acd0157508a06f | |
parent | 8ab4f282c06d67074b872dbda0be37636fdd5186 (diff) | |
parent | ae7faf20d5fb3e2415ccadc37100dfc44aa0cd94 (diff) |
Merge #16095: Catch by reference not value in wallettool
ae7faf20d5 Exceptions should be caught by reference, not by value. (Kristaps Kaupe)
Pull request description:
Fixes this warning with GCC8/GCC9:
```
wallet/wallettool.cpp: In function ‘std::shared_ptr<CWallet> WalletTool::LoadWallet(const string&, const boost::filesystem::path&)’:
wallet/wallettool.cpp:62:25: warning: catching polymorphic type ‘const class std::runtime_error’ by value [-Wcatch-value=]
} catch (const std::runtime_error) {
^~~~~~~~~~~~~
```
Related to #15822.
ACKs for commit ae7faf:
practicalswift:
utACK ae7faf20d5fb3e2415ccadc37100dfc44aa0cd94
Tree-SHA512: 07eb774b3296c0b66ac5040269bff6cd8ba0294c8c95cc08c595efbd535260ff0010fa430ca057eeccd7b38c0a981a3d7a95b675d9e2996853c013dc0bfe8127
-rw-r--r-- | src/wallet/wallettool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp index 5c1b086703..c6132a2686 100644 --- a/src/wallet/wallettool.cpp +++ b/src/wallet/wallettool.cpp @@ -59,7 +59,7 @@ static std::shared_ptr<CWallet> LoadWallet(const std::string& name, const fs::pa try { bool first_run; load_wallet_ret = wallet_instance->LoadWallet(first_run); - } catch (const std::runtime_error) { + } catch (const std::runtime_error&) { fprintf(stderr, "Error loading %s. Is wallet being used by another process?\n", name.c_str()); return nullptr; } |