From 3d01442bec1aadd4e4c328aa72ae7155121c64ee Mon Sep 17 00:00:00 2001 From: Keke Li Date: Fri, 12 Feb 2021 10:13:21 -0800 Subject: [PATCH] enhance error handling --- programs/cleos/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/programs/cleos/main.cpp b/programs/cleos/main.cpp index 09c9dd28d88..3ea631ab6f9 100644 --- a/programs/cleos/main.cpp +++ b/programs/cleos/main.cpp @@ -2241,11 +2241,10 @@ struct activate_subcommand { data = "[\"" + feature_digest + "\"]"; } else { std::cout << "Can't find system feature : " << feature_name_str << std::endl; + return; } fc::variant action_args_var; - if( !data.empty() ) { - action_args_var = json_from_file_or_string(data, fc::json::parse_type::relaxed_parser); - } + action_args_var = json_from_file_or_string(data, fc::json::parse_type::relaxed_parser); auto accountPermissions = get_account_permissions(permissions); send_actions({chain::action{accountPermissions, name(contract_account), name(action), variant_to_bin( name(contract_account), name(action), action_args_var ) }}, signing_keys_opt.get_keys());