From 5157fc17ba7dea6e60ebc49ca34288323f0ecf43 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Fri, 31 Mar 2017 11:10:04 +0900 Subject: [PATCH] [rpc] Include the name of the asset in error message when the asset cannot be identified. --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d40248175b..a91dd8bd78 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -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; }