Skip to main content

arcbox_boot/
error.rs

1/// Errors from boot-assets operations.
2#[derive(Debug, thiserror::Error)]
3pub enum Error {
4    #[error("architecture '{0}' not found in manifest")]
5    ArchNotFound(String),
6
7    #[error("binary '{name}' has no target for architecture '{arch}'")]
8    BinaryArchNotFound { name: String, arch: String },
9
10    #[error("sha256 mismatch for '{name}': expected {expected}, got {actual}")]
11    ChecksumMismatch {
12        name: String,
13        expected: String,
14        actual: String,
15    },
16
17    #[error("unsupported manifest schema version {version}, expected {}", crate::manifest::SCHEMA_VERSION)]
18    UnsupportedSchema { version: u32 },
19
20    #[error("invalid configuration: {0}")]
21    InvalidConfig(String),
22
23    #[error("download failed: {0}")]
24    Download(String),
25
26    #[error("io error: {0}")]
27    Io(#[from] std::io::Error),
28
29    #[error("{0}")]
30    Other(String),
31}
32
33pub type Result<T> = std::result::Result<T, Error>;