wallet::HandleWalletError

Translates a wallet loading result into the appropriate RPC error.

Synopsis

Declared in <wallet/rpc/util.h>

void
HandleWalletError(
    std::shared_ptr<CWallet> const& wallet,
    DatabaseStatus& status,
    bilingual_str& error);

Parameters

NameDescription
walletThe loaded wallet, or null on failure.
statusThe database status returned while loading.
errorThe error message describing the failure.