mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user