diff options
author | Elliot Wirrick <wirrickelliot@gmail.com> | 2021-04-06 06:29:06 -0400 |
---|---|---|
committer | Elliot Wirrick <wirrickelliot@gmail.com> | 2021-04-07 10:10:16 -0400 |
commit | c8ff1d4d2380a70cdd804ba2b70a2988ac726b84 (patch) | |
tree | e7c6c816319db81101e5e6ef88a5fd7df0064074 /src/wallet/wallet_rpc_server.cpp | |
parent | Merge pull request #7387 (diff) | |
download | monero-c8ff1d4d2380a70cdd804ba2b70a2988ac726b84.tar.xz |
monero-wallet-cli: improve error message when tx amount is zero
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 1af832bb3..344ee6b85 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -822,7 +822,7 @@ namespace tools if (at_least_one_destination && dsts.empty()) { er.code = WALLET_RPC_ERROR_CODE_ZERO_DESTINATION; - er.message = "No destinations for this transfer"; + er.message = "Transaction has no destination"; return false; } @@ -3359,6 +3359,11 @@ namespace tools er.code = WALLET_RPC_ERROR_CODE_DAEMON_IS_BUSY; er.message = e.what(); } + catch (const tools::error::zero_amount& e) + { + er.code = WALLET_RPC_ERROR_CODE_ZERO_AMOUNT; + er.message = e.what(); + } catch (const tools::error::zero_destination& e) { er.code = WALLET_RPC_ERROR_CODE_ZERO_DESTINATION; |