diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-02-16 14:21:00 +0100 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-02-16 14:21:00 +0100 |
commit | b23578e47318a4c323ab5ea2292c2569cac9e7f5 (patch) | |
tree | f21879adddf2cabaa52b38e54dcb009efd6de0c4 /src/wallet/wallet_rpc_server.cpp | |
parent | Merge pull request #3195 (diff) | |
parent | Return appropriate error code when there's no connection to daemon (diff) | |
download | monero-b23578e47318a4c323ab5ea2292c2569cac9e7f5.tar.xz |
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)
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 7d17591db..def7340a3 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; @@ -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; |