mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
improve error reproting on #206
This commit is contained in:
parent
ba45fc2685
commit
8fe4c50373
1 changed files with 10 additions and 4 deletions
|
|
@ -938,9 +938,6 @@ impl ActionManager {
|
||||||
match self.pddb.borrow().unlock_basis(&name, Some(BasisRetentionPolicy::Persist)) {
|
match self.pddb.borrow().unlock_basis(&name, Some(BasisRetentionPolicy::Persist)) {
|
||||||
Ok(_) => log::debug!("Basis {} unlocked", name),
|
Ok(_) => log::debug!("Basis {} unlocked", name),
|
||||||
Err(e) => match e.kind() {
|
Err(e) => match e.kind() {
|
||||||
ErrorKind::AlreadyExists => {
|
|
||||||
self.modals.show_notification(t!("vault.basis.already_exists", xous::LANG), None).ok();
|
|
||||||
}
|
|
||||||
ErrorKind::PermissionDenied => {
|
ErrorKind::PermissionDenied => {
|
||||||
self.report_err(t!("vault.error.basis_unlock_error", xous::LANG), None::<std::io::Error>)
|
self.report_err(t!("vault.error.basis_unlock_error", xous::LANG), None::<std::io::Error>)
|
||||||
},
|
},
|
||||||
|
|
@ -951,7 +948,16 @@ impl ActionManager {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(e) => self.report_err(t!("vault.error.internal_error", xous::LANG), Some(e)),
|
Err(e) => {
|
||||||
|
match e.kind() {
|
||||||
|
ErrorKind::AlreadyExists => {
|
||||||
|
self.modals.show_notification(t!("vault.basis.already_exists", xous::LANG), None).ok();
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
self.report_err(t!("vault.error.internal_error", xous::LANG), Some(e))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue