print message when cache file is unreadable
This commit is contained in:
parent
3c141c590a
commit
0ecbd50c8a
@ -145,7 +145,10 @@ impl PortHandler {
|
||||
}
|
||||
|
||||
fn load_or_default(cache: &Path) -> Self {
|
||||
Self::load(cache).unwrap_or(Self::default())
|
||||
Self::load(cache).unwrap_or_else(|err| {
|
||||
println!("failed to parse cache file at {cache:?} using empty cache. error: {err}");
|
||||
Self::default()
|
||||
})
|
||||
}
|
||||
|
||||
fn update_allowed_ports(&mut self, allowed_ports: &AllowedPorts) {
|
||||
|
Loading…
Reference in New Issue
Block a user