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:
Samuel Ortiz
2019-10-01 16:41:50 +02:00
parent 42758244a0
commit 43b3642955
4 changed files with 73 additions and 102 deletions
+6
View File
@@ -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>;