mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
refactor: unify external wallet runtime errors
Rather than 3 different messages that are confusing / leak implementation details, use a single message, that is similar to other wallet related messages. i.e: "Compiled without sqlite support (required for descriptor wallets)".
This commit is contained in:
parent
f4652bf125
commit
8fdbb899b8
2 changed files with 3 additions and 3 deletions
|
@ -2750,7 +2750,7 @@ static RPCHelpMan createwallet()
|
|||
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||
flags |= WALLET_FLAG_EXTERNAL_SIGNER;
|
||||
#else
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Configure with --enable-external-signer to use this");
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without external signing support (required for external signing)");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -4516,7 +4516,7 @@ void CWallet::LoadDescriptorScriptPubKeyMan(uint256 id, WalletDescriptor& desc)
|
|||
auto spk_manager = std::unique_ptr<ScriptPubKeyMan>(new ExternalSignerScriptPubKeyMan(*this, desc));
|
||||
m_spk_managers[id] = std::move(spk_manager);
|
||||
#else
|
||||
throw std::runtime_error(std::string(__func__) + ": Configure with --enable-external-signer to use external signer wallets");
|
||||
throw std::runtime_error(std::string(__func__) + ": Compiled without external signing support (required for external signing)");
|
||||
#endif
|
||||
} else {
|
||||
auto spk_manager = std::unique_ptr<ScriptPubKeyMan>(new DescriptorScriptPubKeyMan(*this, desc));
|
||||
|
@ -4585,7 +4585,7 @@ void CWallet::SetupDescriptorScriptPubKeyMans()
|
|||
}
|
||||
}
|
||||
#else
|
||||
throw std::runtime_error(std::string(__func__) + ": Wallets with external signers require Boost::Process library.");
|
||||
throw std::runtime_error(std::string(__func__) + ": Compiled without external signing support (required for external signing)");
|
||||
#endif // ENABLE_EXTERNAL_SIGNER
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue