mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
More detailed errors when opening files
This commit is contained in:
parent
c0f43d964c
commit
888098bad2
@ -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:#}"))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -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:#}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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:#}"))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -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:#}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user