aboutsummaryrefslogblamecommitdiff
path: root/src/errors.rs
blob: 29f7f4fec69805160d3feefbcec5a76cc944e1c5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10







                                        

                                       





                                                  
 
 
use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error("libvirt: {0}")]
    Libvirt(#[from] virt::error::Error),
    #[error("Unknown: {0}")]
    Other(String),
    #[error("Missing connection: {0}")]
    Connection(String),
    #[error("Missing image: {0}")]
    MissingImage(String),
    #[error("Could not allocate VM storage: {0}")]
    Allocation(String),
    #[error("I/O: {0}")]
    Io(#[from] std::io::Error),
}