diff options
author | Michał Sałaban <michal@salaban.info> | 2018-01-29 08:28:25 +0100 |
---|---|---|
committer | Michał Sałaban <michal@salaban.info> | 2018-01-29 08:28:25 +0100 |
commit | f90c76beb4ae247178518f5097a580b5971374bb (patch) | |
tree | ee219db0f0587cc633a86f8cd5fce5efa2759113 /src/wallet/wallet_rpc_server.cpp | |
parent | Return appropriate error code when not enough money for tx (diff) | |
download | monero-f90c76beb4ae247178518f5097a580b5971374bb.tar.xz |
Return appropriate error code when there's no connection to daemon
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index f995465d2..17ddee238 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -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; |