gix_pack/index/traverse/
error.rs1use crate::index;
2
3#[derive(thiserror::Error, Debug)]
5#[allow(missing_docs)]
6pub enum Error<E: std::error::Error + Send + Sync + 'static> {
7 #[error("One of the traversal processors failed")]
8 Processor(#[source] E),
9 #[error("Failed to verify index file checksum")]
10 IndexVerify(#[source] index::verify::checksum::Error),
11 #[error("The pack delta tree index could not be built")]
12 Tree(#[from] crate::cache::delta::from_offsets::Error),
13 #[error("The tree traversal failed")]
14 TreeTraversal(#[from] crate::cache::delta::traverse::Error),
15 #[error(transparent)]
16 EntryType(#[from] crate::data::entry::decode::Error),
17 #[error("Object {id} at offset {offset} could not be decoded")]
18 PackDecode {
19 id: gix_hash::ObjectId,
20 offset: u64,
21 source: crate::data::decode::Error,
22 },
23 #[error("The packfiles checksum didn't match the index file checksum")]
24 PackMismatch(#[source] gix_hash::verify::Error),
25 #[error("Failed to verify pack file checksum")]
26 PackVerify(#[source] crate::verify::checksum::Error),
27 #[error("Error verifying object at offset {offset} against checksum in the index file")]
28 PackObjectVerify {
29 offset: u64,
30 #[source]
31 source: gix_object::data::verify::Error,
32 },
33 #[error(
34 "The CRC32 of {kind} object at offset {offset} didn't match the checksum in the index file: expected {expected}, got {actual}"
35 )]
36 Crc32Mismatch {
37 expected: u32,
38 actual: u32,
39 offset: u64,
40 kind: gix_object::Kind,
41 },
42 #[error("Interrupted")]
43 Interrupted,
44}