monero-wallet-cli: improve error message when tx amount is zero

This commit is contained in:
Elliot Wirrick 2021-04-06 06:29:06 -04:00
parent 9a5579fc4f
commit c8ff1d4d23
6 changed files with 30 additions and 8 deletions

View file

@ -607,9 +607,14 @@ void simple_wallet::handle_transfer_exception(const std::exception_ptr &e, bool
fail_msg_writer() << e.what();
warn_of_possible_attack = false;
}
catch (const tools::error::zero_amount&)
{
fail_msg_writer() << sw::tr("destination amount is zero");
warn_of_possible_attack = false;
}
catch (const tools::error::zero_destination&)
{
fail_msg_writer() << sw::tr("one of destinations is zero");
fail_msg_writer() << sw::tr("transaction has no destination");
warn_of_possible_attack = false;
}
catch (const tools::error::tx_too_big& e)