1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
use libremexre::errors::GenericError;

/// An error encountered by Flubber.
pub type Error = GenericError<ErrorKind>;

/// The kind of an error encountered by Flubber.
#[derive(Clone, Debug, Display)]
pub enum ErrorKind {
    #[display(fmt = "Could not communicate with a plugin")]
    CouldNotCommunicateWithPlugin,

    #[display(fmt = "Could not start a plugin")]
    CouldNotStartPlugin,
}

/// A convenient alias for `Result`.
pub type Result<T> = ::std::result::Result<T, Error>;