vmm: Improve error handling for vmm::vm::Error

In particular implement thiserror::Error, cleanup wording and remove
unused errors.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2022-04-20 17:20:54 +01:00
parent cb03540ffd
commit 62f17ccf8c
2 changed files with 99 additions and 106 deletions
+1 -1
View File
@@ -508,7 +508,7 @@ impl Vmm {
let source_url = restore_cfg.source_url.as_path().to_str();
if source_url.is_none() {
return Err(VmError::RestoreSourceUrlPathToStr);
return Err(VmError::InvalidRestoreSourceUrl);
}
// Safe to unwrap as we checked it was Some(&str).
let source_url = source_url.unwrap();