Skip to content

Commit

Permalink
Report the root cause of non-fatal errors. (#1034)
Browse files Browse the repository at this point in the history
We don't want to get opaque errors like `encountered non-fatal error
while working on crate example v1.0 (current): skipping package metadata
due to failure to load it; package manifest checks will not discover any
breakage` that don't tell us what actually happened to cause this.
  • Loading branch information
obi1kenobi authored Dec 10, 2024
1 parent 0f07691 commit 2b67091
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ impl<'a> crate::data_generation::ProgressCallbacks<'a> for Callbacks<'a> {
let _ = self.config.log_info(|config| {
config.shell_warn(format!(
"encountered non-fatal error while working on crate \
{crate_name} v{version} ({kind}): {error}",
{crate_name} v{version} ({kind}): {error} (root cause: {})",
error.root_cause()
))?;
Ok(())
});
Expand Down

0 comments on commit 2b67091

Please sign in to comment.