From 18206552fc60450a628056646eeabd0618868e61 Mon Sep 17 00:00:00 2001 From: Valera Cogut Date: Fri, 20 Jul 2018 16:44:31 +0300 Subject: [PATCH] throwing fc:canceled_exception for quit cli wallet command --- src/rpc/cli.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/rpc/cli.cpp b/src/rpc/cli.cpp index 2788f49..0021ada 100644 --- a/src/rpc/cli.cpp +++ b/src/rpc/cli.cpp @@ -14,12 +14,6 @@ # endif #endif -#ifdef WIN32 -# include -#else -# include -#endif - namespace fc { namespace rpc { static std::vector& cli_commands() @@ -109,15 +103,15 @@ void cli::run() } else std::cout << itr->second( result, args ) << "\n"; - - if (result.is_integer() && result.as_int64() == SIGQUIT) - { - break; - } } catch ( const fc::exception& e ) { std::cout << e.to_detail_string() << "\n"; + + if (e.code() == fc::canceled_exception_code) + { + break; + } } } }