[rpc] Include the name of the asset in error message when the asset cannot be identified.

This commit is contained in:
Karl-Johan Alm 2017-03-31 11:10:04 +09:00 committed by Gregory Sanders
parent 2ac5eafbca
commit 5157fc17ba

View file

@ -56,7 +56,7 @@ static CAsset GetAssetFromString(const std::string& strasset)
asset = CAsset(uint256S(strasset));
}
if (asset.IsNull()) {
throw JSONRPCError(RPC_WALLET_ERROR, "Unknown label and invalid asset hex");
throw JSONRPCError(RPC_WALLET_ERROR, strprintf("Unknown label and invalid asset hex: %s", strasset.c_str()));
}
return asset;
}