mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 01:02:19 -04:00
monero-wallet-cli: improve error message when tx amount is zero
This commit is contained in:
parent
9a5579fc4f
commit
c8ff1d4d23
6 changed files with 30 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue