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/api/wallet.cpp | |
| parent | 9a5579fc4f9caa41ef05d0c8190ce03a6f33f84c (diff) | |
| download | monzero-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/api/wallet.cpp')
| -rw-r--r-- | src/wallet/api/wallet.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 9d3ec4399..04d6f4056 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -1567,8 +1567,10 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector<stri setStatusError(writer.str()); } catch (const tools::error::tx_sum_overflow& e) { setStatusError(e.what()); + } catch (const tools::error::zero_amount&) { + setStatusError(tr("destination amount is zero")); } catch (const tools::error::zero_destination&) { - setStatusError(tr("one of destinations is zero")); + setStatusError(tr("transaction has no destination")); } catch (const tools::error::tx_too_big& e) { setStatusError(tr("failed to find a suitable way to split transactions")); } catch (const tools::error::transfer_error& e) { |
