chrome_cache_parser/
error.rs

1use thiserror::Error;
2
3pub type CCPResult<T> = Result<T, CCPError>;
4
5#[derive(Error, Debug)]
6pub enum CCPError {
7    #[error("io error")]
8    Io {
9        #[from]
10        source: std::io::Error,
11    },
12    #[error("unsupported version ({0})")]
13    UnsupportedVersion(String),
14    #[error("invalid data ({0})")]
15    InvalidData(String),
16    #[error("invalid state ({0})")]
17    InvalidState(String),
18    #[error("data misalignment ({0})")]
19    DataMisalignment(String),
20    #[error("chrome cache index does not exist at {0}")]
21    IndexDoesNotExist(String),
22    #[error("chrome cache location could not be determined")]
23    CacheLocationCouldNotBeDetermined(),
24    #[error("invalid timestamp ({0})")]
25    InvalidTimestamp(u64),
26}