From cdd891afa05abee5278a509a364be29604acd7de Mon Sep 17 00:00:00 2001 From: Hanif Ariffin Date: Tue, 19 Oct 2021 01:58:53 +0800 Subject: [PATCH] feat: improved error message when a namespace fails to open --- synth/src/cli/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/synth/src/cli/mod.rs b/synth/src/cli/mod.rs index d601f9bb..2864c972 100644 --- a/synth/src/cli/mod.rs +++ b/synth/src/cli/mod.rs @@ -158,10 +158,12 @@ impl Cli { seed: u64, schema: Option, ) -> Result<()> { - let namespace = self - .store - .get_ns(ns_path.clone()) - .context("Unable to open the namespace")?; + let namespace = self.store.get_ns(ns_path.clone()).context(format!( + "Unable to open the namespace \"{}\"", + ns_path + .to_str() + .expect("The provided namespace is not a valid UTF-8 string") + ))?; let export_strategy: Box = DataSourceParams { uri: to, schema }.try_into()?;