diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index 468659e5b9fbfcceee9b03f49ec663832a354e18..322b2ae894fbfa636643968a686eb572fddaee5b 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -1709,6 +1709,7 @@ impl Project { self.open_remote_buffer_internal(&project_path.path, &worktree, cx) }; + let project_path = project_path.clone(); cx.spawn(move |this, mut cx| async move { let load_result = load_buffer.await; *tx.borrow_mut() = Some(this.update(&mut cx, |this, _| { @@ -1726,7 +1727,7 @@ impl Project { cx.foreground().spawn(async move { wait_for_loading_buffer(loading_watch) .await - .map_err(|error| anyhow!("{}", error)) + .map_err(|error| anyhow!("{project_path:?} opening failure: {error:#}")) }) } diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rs index 80fd44761c7ca3d1afee4247cab5b019da5d111b..785ce58bb8d2b40266a25106deb15fe666d2c823 100644 --- a/crates/project/src/worktree.rs +++ b/crates/project/src/worktree.rs @@ -3694,7 +3694,7 @@ impl BackgroundScanner { } Err(err) => { // TODO - create a special 'error' entry in the entries tree to mark this - log::error!("error reading file on event {:?}", err); + log::error!("error reading file {abs_path:?} on event: {err:#}"); } } } diff --git a/crates/project2/src/project2.rs b/crates/project2/src/project2.rs index efe407f847baabda23811994e324ace3630a7756..61ad500a73413d795bc9fcf7bcc38c5355aba07c 100644 --- a/crates/project2/src/project2.rs +++ b/crates/project2/src/project2.rs @@ -1741,6 +1741,7 @@ impl Project { self.open_remote_buffer_internal(&project_path.path, &worktree, cx) }; + let project_path = project_path.clone(); cx.spawn(move |this, mut cx| async move { let load_result = load_buffer.await; *tx.borrow_mut() = Some(this.update(&mut cx, |this, _| { @@ -1759,7 +1760,7 @@ impl Project { cx.background_executor().spawn(async move { wait_for_loading_buffer(loading_watch) .await - .map_err(|error| anyhow!("{}", error)) + .map_err(|error| anyhow!("{project_path:?} opening failure: {error:#}")) }) } diff --git a/crates/project2/src/worktree.rs b/crates/project2/src/worktree.rs index 65959d3f310598de3a6e6c4d5b59e215d262d351..9444dd9185440e7fbc953ac4a96dfe4e89e8c50f 100644 --- a/crates/project2/src/worktree.rs +++ b/crates/project2/src/worktree.rs @@ -3684,7 +3684,7 @@ impl BackgroundScanner { } Err(err) => { // TODO - create a special 'error' entry in the entries tree to mark this - log::error!("error reading file on event {:?}", err); + log::error!("error reading file {abs_path:?} on event: {err:#}"); } } }