1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#[derive(err_derive::Error, Debug)]
pub enum Error {
    #[error(display = "Invalid Data")]
    InvalidData,
    #[error(display = "Additional data needed")]
    MoreDataNeeded,
    #[error(display = "Configuration Incomplete")]
    ConfigurationIncomplete,
    #[error(display = "Configuration Invalid")]
    ConfigurationInvalid,
    #[error(display = "Unsupported feature {}", _0)]
    Unsupported(String),
    // TODO add support for dependency-specific errors here
    // Inner(failure::Context)
}

pub type Result<T> = ::std::result::Result<T, Error>;