#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Invalid OLE file: {0}")]
InvalidOle(String),
#[error("Invalid OOXML file: {0}")]
InvalidOoxml(String),
#[error("VBA decompression failed: {0}")]
VbaDecompression(String),
#[error("VBA parsing failed: {0}")]
VbaParsing(String),
#[error("XML parsing failed: {0}")]
XmlParsing(String),
#[error("ZIP error: {0}")]
Zip(#[from] zip::result::ZipError),
#[error("Unsupported encryption")]
UnsupportedEncryption,
#[error("Wrong password")]
WrongPassword,
#[error("Unsupported file format: {0}")]
UnsupportedFormat(String),
#[error("Encoding error: {0}")]
Encoding(String),
#[error("RTF parsing failed: {0}")]
RtfParsing(String),
#[error("OLE object parsing failed: {0}")]
OleObjectParsing(String),
#[error("DDE detection failed: {0}")]
DdeParsing(String),
}
pub type Result<T> = std::result::Result<T, Error>;