20 lines
653 B
Rust
20 lines
653 B
Rust
use thiserror::Error;
|
|
|
|
pub type Result<T, E = Error> = std::result::Result<T, E>;
|
|
|
|
#[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),
|
|
}
|