Skip to main content

actr_pack/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum PackError {
5    #[error("invalid package: {0}")]
6    InvalidPackage(String),
7
8    #[error("manifest.toml not found in package")]
9    ManifestNotFound,
10
11    #[error("manifest parse error: {0}")]
12    ManifestParseError(String),
13
14    #[error("manifest.sig not found in package")]
15    SignatureNotFound,
16
17    #[error("binary not found in package: {0}")]
18    BinaryNotFound(String),
19
20    #[error("binary hash mismatch: {path}")]
21    BinaryHashMismatch { path: String },
22
23    #[error("resource hash mismatch: {path}")]
24    ResourceHashMismatch { path: String },
25
26    #[error("proto file hash mismatch: {path}")]
27    ProtoHashMismatch { path: String },
28
29    #[error("manifest lock file hash mismatch: {path}")]
30    LockFileHashMismatch { path: String },
31
32    #[error("signature verification failed: {0}")]
33    SignatureVerificationFailed(String),
34
35    #[error("I/O error: {0}")]
36    IoError(#[from] std::io::Error),
37
38    #[error("ZIP error: {0}")]
39    ZipError(#[from] zip::result::ZipError),
40}