mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
rpc: Use type-safe exception to pass RPC help
This commit is contained in:
@@ -645,7 +645,7 @@ UniValue RPCHelpMan::HandleRequest(const JSONRPCRequest& request) const
|
||||
* the user is asking for help information, and throw help when appropriate.
|
||||
*/
|
||||
if (request.mode == JSONRPCRequest::GET_HELP || !IsValidNumArgs(request.params.size())) {
|
||||
throw std::runtime_error(ToString());
|
||||
throw HelpResult{ToString()};
|
||||
}
|
||||
UniValue arg_mismatch{UniValue::VOBJ};
|
||||
for (size_t i{0}; i < m_args.size(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user