summaryrefslogtreecommitdiff
path: root/src/error.rs
blob: 77eab698d87788ae42fc78064ea37a878c6422f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub type Result<T> = std::result::Result<T, Error>;

#[derive(Debug, PartialEq, Eq, thiserror::Error)]
pub enum Error {
    #[error("unknown custom directory '{0}'")]
    CustomDirectory(String),

    #[error("invalid directory index '{0}'")]
    InvalidIndex(String),

    #[error("no directory index given")]
    NoIndex,

    #[error("invalid directory '{0}'")]
    InvalidDirectory(String),

    #[error("Only exactly one user allowed in config")]
    MultiUser,
}