fix: stabilize core error handling

Remove production panic and unwrap paths from core modules.

Propagate bookmark encryption failures, harden file watcher and temp mapped file handling, and clean up dead code in shared utilities.
This commit is contained in:
Christian Visintin
2026-04-19 01:54:46 +05:30
parent 0025b87b0f
commit bc4b096077
15 changed files with 365 additions and 325 deletions
+8 -2
View File
@@ -71,7 +71,10 @@ impl AuthActivity {
};
if let Some(bookmarks_cli) = self.bookmarks_client_mut() {
bookmarks_cli.add_bookmark(name.clone(), params, save_password);
if let Err(err) = bookmarks_cli.add_bookmark(name.clone(), params, save_password) {
self.mount_error(format!("Could not save bookmark: {err}"));
return;
}
// Save bookmarks
self.write_bookmarks();
// Remove `name` from bookmarks if exists
@@ -121,7 +124,10 @@ impl AuthActivity {
}
};
if let Some(bookmarks_cli) = self.bookmarks_client_mut() {
bookmarks_cli.add_recent(params);
if let Err(err) = bookmarks_cli.add_recent(params) {
self.mount_error(format!("Could not save recent host: {err}"));
return;
}
// Save bookmarks
self.write_bookmarks();
}