mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 04:22:19 -04:00
Merge pull request #3197
f90c76be
Return appropriate error code when there's no connection to daemon (Michał Sałaban)3cb65b3f
Return appropriate error code when not enough money for tx (Michał Sałaban)
This commit is contained in:
commit
b23578e473
2 changed files with 12 additions and 0 deletions
|
@ -2397,6 +2397,11 @@ namespace tools
|
|||
{
|
||||
std::rethrow_exception(e);
|
||||
}
|
||||
catch (const tools::error::no_connection_to_daemon& e)
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_NO_DAEMON_CONNECTION;
|
||||
er.message = e.what();
|
||||
}
|
||||
catch (const tools::error::daemon_busy& e)
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_DAEMON_IS_BUSY;
|
||||
|
@ -2412,6 +2417,11 @@ namespace tools
|
|||
er.code = WALLET_RPC_ERROR_CODE_NOT_ENOUGH_MONEY;
|
||||
er.message = e.what();
|
||||
}
|
||||
catch (const tools::error::not_enough_unlocked_money& e)
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_NOT_ENOUGH_UNLOCKED_MONEY;
|
||||
er.message = e.what();
|
||||
}
|
||||
catch (const tools::error::tx_not_possible& e)
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_TX_NOT_POSSIBLE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue