use thiserror::Error; pub type Result = std::result::Result; #[derive(Debug, Error)] pub enum Error { #[error("error processing mod zip file")] Zip(#[from] zip::result::ZipError), #[error("io error reading/extracting mod")] Io(#[from] std::io::Error), #[error("invalid mod manifest")] InvalidManifest(#[from] serde_json::Error), #[error("the ttmp's data file was missing or corrupt")] MissingDataFile(zip::result::ZipError), #[error("the ttmp data file was corrupt")] SqPackError(#[from] sqpack::binrw::Error), #[error("error writing to output")] BinRwWrite(sqpack::binrw::Error), }