BlueGit

ict rusty-teams

Files

rusty-teams / crates / store / src / error.rs

error.rs

Initial commit
metis Daniel Däschle · pushed by metis · 7 weeks ago
06e0ae51 History
error.rs 677 B Download Raw
1pub type Result<T> = std::result::Result<T, Error>;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error("database error: {0}")]
6 Sqlite(#[from] rusqlite::Error),
7 #[error("cannot create the data directory {path}: {source}")]
8 DataDirectory {
9 path: String,
10 source: std::io::Error,
11 },
12 #[error("no platform data directory available")]
13 NoDataDirectory,
14 #[error("database schema version {found} is newer than this build supports ({supported})")]
15 SchemaTooNew { found: i64, supported: i64 },
16 #[error("image file cache: {0}")]
17 ImageFiles(#[from] std::io::Error),
18 #[error("database lock poisoned")]
19 Poisoned,
20}