aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_errors.h
diff options
context:
space:
mode:
authorElliot Wirrick <wirrickelliot@gmail.com>2021-04-06 06:29:06 -0400
committerElliot Wirrick <wirrickelliot@gmail.com>2021-04-07 10:10:16 -0400
commitc8ff1d4d2380a70cdd804ba2b70a2988ac726b84 (patch)
treee7c6c816319db81101e5e6ef88a5fd7df0064074 /src/wallet/wallet_errors.h
parent9a5579fc4f9caa41ef05d0c8190ce03a6f33f84c (diff)
downloadmonzero-core-c8ff1d4d2380a70cdd804ba2b70a2988ac726b84.tar.gz
monzero-core-c8ff1d4d2380a70cdd804ba2b70a2988ac726b84.tar.xz
monzero-core-c8ff1d4d2380a70cdd804ba2b70a2988ac726b84.zip
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.h11
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")
{
}
};