Skip to content

Commit

Permalink
log error on failed file re-open
Browse files Browse the repository at this point in the history
  • Loading branch information
panekj committed Jul 6, 2024
1 parent ed9e8cf commit cfd684b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lapce-proxy/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ impl ProxyHandler for Dispatcher {
if get_mod_time(&buffer.path) == buffer.mod_time {
return;
}
if let Ok(content) = load_file(&buffer.path) {
self.core_rpc.open_file_changed(path, content);
match load_file(&buffer.path) {
Ok(content) => {
self.core_rpc.open_file_changed(path, content);
}
Err(err) => {
tracing::event!(tracing::Level::ERROR, "Failed to re-read file after change notification: {err}");
}
}
}
}
Expand Down

0 comments on commit cfd684b

Please sign in to comment.