Skip to main content

iso9660_forensic/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum IsoError {
5    #[error("I/O error: {0}")]
6    Io(#[from] std::io::Error),
7    #[error("not an ISO image: missing CD001 signature at sector 16")]
8    NotAnIso,
9    #[error("unsupported sector size: expected 2048 or 2352, detected {0}")]
10    UnsupportedSectorSize(u64),
11    #[error("volume descriptor parse error: {0}")]
12    BadDescriptor(String),
13    #[error("directory record parse error: {0}")]
14    BadDirRecord(String),
15    #[error("file not found: {0}")]
16    NotFound(String),
17    #[error("path traversal outside root")]
18    PathTraversal,
19    #[error("resource limit exceeded: {0}")]
20    ResourceLimit(String),
21}