More detailed errors when opening files

This commit is contained in:
Kirill Bulatov 2023-11-15 16:20:00 +02:00
parent c0f43d964c
commit 888098bad2
4 changed files with 6 additions and 4 deletions

View file

@ -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:#}"))
})
}