aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcdump.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-08-02 19:19:53 -0400
committerAndrew Chow <achow101-github@achow101.com>2019-08-16 19:34:01 -0400
commit625534d7b1417da926f1ced600855ea818d6e01e (patch)
treeb7ec5d310f4f2e169e57516c0032ff0c98156833 /src/wallet/rpcdump.cpp
parentc325f619dd071b5489989f645e42cace8eb23fb4 (diff)
Give more errors for specific failure conditions
Some failure conditions implicitly fail by failing some other check. But the error messages are more helpful if they say explicitly what actually caused the failure, so add those as failure conditions and errors.
Diffstat (limited to 'src/wallet/rpcdump.cpp')
-rw-r--r--src/wallet/rpcdump.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index fad0aefabd..7707d6233b 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -1101,7 +1101,7 @@ static UniValue ProcessImportDescriptor(ImportData& import_data, std::map<CKeyID
std::string error;
auto parsed_desc = Parse(descriptor, keys, error, /* require_checksum = */ true);
if (!parsed_desc) {
- throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Descriptor is invalid, %s", error));
+ throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, error);
}
have_solving_data = parsed_desc->IsSolvable();