diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-07-27 17:51:14 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-07-27 18:58:24 +0200 |
commit | 0b11a07848754347add990a2b2cff4828ffa2be0 (patch) | |
tree | 4ae97378b6c0c3e3e8ac3b4b4a8833de070ae2e8 /src/bitcoin-cli.cpp | |
parent | ba1bbb049b8f3ad295f36b060f775591b1fed8c1 (diff) | |
parent | df389bca2048f5814387987463fe3298766bc6b6 (diff) | |
download | bitcoin-0b11a07848754347add990a2b2cff4828ffa2be0.tar.xz |
Merge #10931: Fix misleading "Method not found" multiwallet errors
df389bc Change wallet method disabled error text (Russell Yanofsky)
e526b3d Fix misleading "Method not found" multiwallet errors (Russell Yanofsky)
Pull request description:
Raise RPC_WALLET_NOT_SPECIFIED instead of RPC_METHOD_NOT_FOUND when a required
wallet filename was not specified in an RPC call.
Also raise more specific RPC_WALLET_NOT_FOUND error instead of
RPC_INVALID_PARAMETER in case an invalid wallet was specified, for consistency.
Tree-SHA512: 6a8d885283f69bcfc28f2e08ac03eff02f9f8160a312ce2a90d868aa52533434fc0b4c4ab86547c2f09392338956df915637eaf7136a4fc105e6c8179f2d0ac8
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r-- | src/bitcoin-cli.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 445b9d8e89..c1a7c927e3 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -337,6 +337,10 @@ int CommandLineRPC(int argc, char *argv[]) if (errMsg.isStr()) strPrint += "error message:\n"+errMsg.get_str(); + + if (errCode.isNum() && errCode.get_int() == RPC_WALLET_NOT_SPECIFIED) { + strPrint += "\nTry adding \"-rpcwallet=<filename>\" option to bitcoin-cli command line."; + } } } else { // Result |