diff options
| author | Andrew Chow <[email protected]> | 2019-08-02 19:19:53 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2019-08-16 19:34:01 -0400 |
| commit | 625534d7b1417da926f1ced600855ea818d6e01e (patch) | |
| tree | b7ec5d310f4f2e169e57516c0032ff0c98156833 /src/rpc/util.cpp | |
| parent | Return an error from descriptor Parse that gives more information about what ... (diff) | |
| download | discoin-625534d7b1417da926f1ced600855ea818d6e01e.tar.xz discoin-625534d7b1417da926f1ced600855ea818d6e01e.zip | |
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/rpc/util.cpp')
| -rw-r--r-- | src/rpc/util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 52b2b9485..464537a5b 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -720,7 +720,7 @@ std::vector<CScript> EvalDescriptorStringOrObject(const UniValue& scanobject, Fl std::string error; auto desc = Parse(desc_str, provider, error); if (!desc) { - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Invalid descriptor '%s', %s", desc_str, error)); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, error); } if (!desc->IsRange()) { range.first = 0; |