From 2e44d8f23c4b09f40d317fd0b56d445c4d04abd3 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 9 Sep 2017 11:45:51 +0100 Subject: [PATCH] wallet_rpc_server: guard against exceptions CID 175305 --- src/wallet/wallet_rpc_server.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 {