1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum ZipParseError {
5 #[error("file too big. was {0} bytes")]
6 FileTooLarge(u64),
7 #[error("io error {0}")]
8 IoError(#[from] std::io::Error),
9 #[error("found {found:?}, expected {expected:?}")]
10 MalformedSignature { found: [u8; 4], expected: [u8; 4] },
11 #[error("generic error: {0}")]
12 Generic(&'static str),
13 #[error("expected file to be longer")]
14 UnexpectedEof,
15 #[error("unable to locate central directory signature")]
16 MissingCentralDirectory,
17}