mirror of
https://github.com/veeso/termscp.git
synced 2026-09-27 06:21:22 -07:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user