diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-09 11:45:51 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-09-25 15:48:10 +0100 |
commit | 2e44d8f23c4b09f40d317fd0b56d445c4d04abd3 (patch) | |
tree | dbd200420c5695de47dbb70467d24d1c37b2e82f /src/wallet/wallet_rpc_server.cpp | |
parent | simplewallet: guard against I/O exceptions (diff) | |
download | monero-2e44d8f23c4b09f40d317fd0b56d445c4d04abd3.tar.xz |
wallet_rpc_server: guard against exceptions
CID 175305
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 9368b8cb6..d114bef2c 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -1887,7 +1887,15 @@ just_dir: wrpc.send_stop_signal(); }); LOG_PRINT_L0(tools::wallet_rpc_server::tr("Starting wallet rpc server")); - wrpc.run(); + try + { + wrpc.run(); + } + catch (const std::exception &e) + { + LOG_ERROR(tools::wallet_rpc_server::tr("Failed to run wallet: ") << e.what()); + return 1; + } LOG_PRINT_L0(tools::wallet_rpc_server::tr("Stopped wallet rpc server")); try { |