Skip to content

Commit

Permalink
feat: improved error message when a namespace fails to open
Browse files Browse the repository at this point in the history
  • Loading branch information
hbina authored Oct 18, 2021
1 parent 4f615b0 commit cdd891a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions synth/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@ impl Cli {
seed: u64,
schema: Option<String>,
) -> 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<dyn ExportStrategy> =
DataSourceParams { uri: to, schema }.try_into()?;
Expand Down

0 comments on commit cdd891a

Please sign in to comment.