From: Steve Myers Date: Tue, 29 Mar 2022 21:11:33 +0000 (-0700) Subject: Fix repl error and help printing X-Git-Tag: v0.5.0~9^2 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/enum.HexToArrayError.html?a=commitdiff_plain;h=fd3f2b4c1188abb0a70946ec651bfb9c03220857;p=bdk-cli Fix repl error and help printing --- diff --git a/src/bdk_cli.rs b/src/bdk_cli.rs index 736f9ae..b094834 100644 --- a/src/bdk_cli.rs +++ b/src/bdk_cli.rs @@ -374,8 +374,13 @@ fn handle_command(cli_opts: CliOpts, network: Network) -> Result .as_str()) }) .collect::, Error>>()?; - let repl_subcommand = ReplSubCommand::from_iter_safe(split_line) - .map_err(|e| Error::Generic(e.to_string()))?; + let repl_subcommand = ReplSubCommand::from_iter_safe(split_line); + if let Err(err) = repl_subcommand { + println!("{}", err.to_string()); + continue; + } + // if error will be printed above + let repl_subcommand = repl_subcommand.unwrap(); debug!("repl_subcommand = {:?}", repl_subcommand); let result = match repl_subcommand {