mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Clean Error handling up
We used to have errors definitions spread across vmm, vm, api, and http. We now have a cleaner separation: All API routines only return an ApiResult. All VM operations, including the VMM wrappers, return a VmResult. This makes it easier to carry errors up to the HTTP caller. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
@@ -209,6 +209,12 @@ pub enum Error {
|
||||
|
||||
/// Failed to create a new KVM instance
|
||||
KvmNew(io::Error),
|
||||
|
||||
/// VM is not created
|
||||
VmNotCreated,
|
||||
|
||||
/// Cannot clone EventFd.
|
||||
EventFdClone(io::Error),
|
||||
}
|
||||
pub type Result<T> = result::Result<T, Error>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user