Skip to content

Commit

Permalink
display error when failing to change dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Apr 18, 2024
1 parent 1f0f444 commit 97f8e10
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions crates/ferrite-core/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ impl Engine {
) {
Ok(file_daemon) => self.file_daemon = file_daemon,
Err(err) => {
tracing::error!("Error creating file daemon: {err}")
let msg = format!("Error creating file daemon: {err}");
tracing::error!(msg);
self.palette.set_error(msg);
}
}

Expand All @@ -352,14 +354,19 @@ impl Engine {
) {
Ok(branch_watcher) => self.branch_watcher = branch_watcher,
Err(err) => {
tracing::error!("Error creating branch watcher: {err}")
let msg =
format!("Error creating branch watcher: {err}");
tracing::error!(msg);
self.palette.set_error(msg);
}
}

self.workspace = match Workspace::load_workspace() {
Ok(workspace) => workspace,
Err(err) => {
tracing::error!("Error loading workspace: {err}");
let msg = format!("Error loading workspace: {err}");
tracing::error!(msg);
self.palette.set_error(msg);
Workspace::default()
}
};
Expand Down

0 comments on commit 97f8e10

Please sign in to comment.