struct_audit/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum Error {
5    #[error("Failed to read file: {0}")]
6    Io(#[from] std::io::Error),
7
8    #[error("Failed to parse binary: {0}")]
9    ObjectParse(#[from] object::read::Error),
10
11    #[error("No debug information found. Compile with -g flag to include DWARF debug info.")]
12    NoDebugInfo,
13
14    #[error("Unsupported binary format. Supported: ELF, Mach-O, PE.")]
15    UnsupportedFormat,
16
17    #[error("DWARF parsing error: {0}")]
18    Dwarf(String),
19}
20
21pub type Result<T> = std::result::Result<T, Error>;