mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-24 06:07:46 +00:00
Return appropriate error code when there's no connection to daemon
This commit is contained in:
parent
3cb65b3f69
commit
f90c76beb4
2 changed files with 6 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;
|
||||
|
|
|
@ -68,3 +68,4 @@
|
|||
#define WALLET_RPC_ERROR_CODE_MULTISIG_SIGNATURE -35
|
||||
#define WALLET_RPC_ERROR_CODE_MULTISIG_SUBMISSION -36
|
||||
#define WALLET_RPC_ERROR_CODE_NOT_ENOUGH_UNLOCKED_MONEY -37
|
||||
#define WALLET_RPC_ERROR_CODE_NO_DAEMON_CONNECTION -38
|
||||
|
|
Loading…
Reference in a new issue