Better log canonicalization errors (#32030)
Based on https://github.com/zed-industries/zed/issues/18673#issuecomment-2933025951 Adds an anyhow error context with the path used for canonicalization (also, explicitly mention path at the place from the comment). Release Notes: - N/A
This commit is contained in:
parent
2db2271e3c
commit
faa0bb51c9
2 changed files with 4 additions and 2 deletions
|
@ -597,7 +597,9 @@ impl Fs for RealFs {
|
|||
}
|
||||
|
||||
async fn canonicalize(&self, path: &Path) -> Result<PathBuf> {
|
||||
Ok(smol::fs::canonicalize(path).await?)
|
||||
Ok(smol::fs::canonicalize(path)
|
||||
.await
|
||||
.with_context(|| format!("canonicalizing {path:?}"))?)
|
||||
}
|
||||
|
||||
async fn is_file(&self, path: &Path) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue