ouisync/store/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("database")]
    Db(#[from] sqlx::Error),
    #[error("malformed data")]
    MalformedData,
    #[error("branch not found")]
    BranchNotFound,
    #[error("attempt to create outdated root node")]
    OutdatedRootNode,
    #[error("attempt to create concurrent root node in the same branch")]
    ConcurrentRootNode,
    #[error("locator not found")]
    LocatorNotFound,
    #[error("block not found")]
    BlockNotFound,
}