Improving Error Handling #20

Merged
rawan merged 2 commits from main_error_handling into development 2026-02-26 10:11:07 +00:00
Member
related issues: https://forge.ourworld.tf/geomind_code/my_hypervisor/issues/17 for more info: https://gist.github.com/xmonader/aff3afb23e100b29bb2ffb3455421981#51-excessive-use-of-unwrap-and-expect https://gist.github.com/xmonader/aff3afb23e100b29bb2ffb3455421981#52-silent-error-suppression
fix: fixed excessive use of unwrap()
All checks were successful
Unit and Integration Test / test (push) Successful in 2m14s
f0f32f9fc3
fix: silent errors
All checks were successful
Unit and Integration Test / test (push) Successful in 2m12s
90a6ca04fc
salmaelsoly requested changes 2026-02-25 10:05:47 +00:00
Dismissed
@ -48,0 +47,4 @@
eprintln!("[init] Warning: Failed to create {new_path}: {e}");
continue;
}
if let Err(e) = mount(
Member

what if the error was the dir already exist? we will skip mount call for that as well, i think we need to try move mount if error too

what if the error was the dir already exist? we will skip mount call for that as well, i think we need to try move mount if error too
Author
Member

https://doc.rust-lang.org/beta/std/fs/fn.create_dir_all.html#errors

create_dir_all doesn't return an error if the directory already exists. it justcreates the directory if it's missing.

https://doc.rust-lang.org/beta/std/fs/fn.create_dir_all.html#errors `create_dir_all` doesn't return an error if the directory already exists. it justcreates the directory if it's missing.
rawan merged commit bcac8a5c5c into development 2026-02-26 10:11:07 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/my_hypervisor!20
No description provided.