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_errors.h | |
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_errors.h')
-rw-r--r-- | src/wallet/wallet_errors.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h index 4a89ed81a..011780f43 100644 --- a/src/wallet/wallet_errors.h +++ b/src/wallet/wallet_errors.h @@ -83,6 +83,7 @@ namespace tools // tx_rejected // tx_sum_overflow // tx_too_big + // zero_amount // zero_destination // wallet_rpc_error * // daemon_busy @@ -750,10 +751,18 @@ namespace tools uint64_t m_tx_weight_limit; }; //---------------------------------------------------------------------------------------------------- + struct zero_amount: public transfer_error + { + explicit zero_amount(std::string&& loc) + : transfer_error(std::move(loc), "destination amount is zero") + { + } + }; + //---------------------------------------------------------------------------------------------------- struct zero_destination : public transfer_error { explicit zero_destination(std::string&& loc) - : transfer_error(std::move(loc), "destination amount is zero") + : transfer_error(std::move(loc), "transaction has no destination") { } }; |