Skip to content

Commit

Permalink
better error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 9, 2023
1 parent 3e4bdb0 commit 2c77e6c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ impl Sodg {
continue;
};
let (head, tail) = Self::split_a(&k);
let other_name = cl(v, &head, &tail)?;
if let Some(to) = self.kid(v, other_name.as_str()) {
trace!("#find: ν{v}.{k} -> ν{to}");
let redirect = cl(v, &head, &tail)?;
if let Some(to) = self.kid(v, redirect.as_str()) {
trace!("#find: ν{v}.{k} -> ν{to} (redirect to {redirect})");
v = to;
continue;
};
Expand All @@ -354,7 +354,7 @@ impl Sodg {
.map(|e| e.a.clone())
.collect();
return Err(anyhow!(
"Can't find .{} in ν{} among other {} attribute{}: {}",
"Can't find .{} in ν{} among other {} attribute{}: {} (redirect to {redirect} didn't help)",
k,
v,
others.len(),
Expand Down

0 comments on commit 2c77e6c

Please sign in to comment.