summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
new file mode 100644
index 0000000..77eab69
--- /dev/null
+++ b/src/error.rs
@@ -0,0 +1,19 @@
1pub type Result<T> = std::result::Result<T, Error>;
2
3#[derive(Debug, PartialEq, Eq, thiserror::Error)]
4pub enum Error {
5 #[error("unknown custom directory '{0}'")]
6 CustomDirectory(String),
7
8 #[error("invalid directory index '{0}'")]
9 InvalidIndex(String),
10
11 #[error("no directory index given")]
12 NoIndex,
13
14 #[error("invalid directory '{0}'")]
15 InvalidDirectory(String),
16
17 #[error("Only exactly one user allowed in config")]
18 MultiUser,
19}