diff options
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 10 | ||||
-rw-r--r-- | src/wallet/wallet_rpc_server_error_codes.h | 2 |
2 files changed, 12 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; diff --git a/src/wallet/wallet_rpc_server_error_codes.h b/src/wallet/wallet_rpc_server_error_codes.h index 311556657..38c464895 100644 --- a/src/wallet/wallet_rpc_server_error_codes.h +++ b/src/wallet/wallet_rpc_server_error_codes.h @@ -67,3 +67,5 @@ #define WALLET_RPC_ERROR_CODE_BAD_MULTISIG_TX_DATA -34 #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 |