1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum BvError {
5 #[error("failed to parse manifest: {0}")]
6 ManifestParse(String),
7
8 #[error("failed to parse lockfile: {0}")]
9 LockfileParse(String),
10
11 #[error("container runtime '{runtime}' not available: {reason}")]
12 RuntimeNotAvailable { runtime: String, reason: String },
13
14 #[error("runtime error: {0}")]
15 RuntimeError(String),
16
17 #[error("index error: {0}")]
18 IndexError(String),
19
20 #[error("hardware requirements not met: {0}")]
21 HardwareMismatch(String),
22
23 #[error("reference data error: {0}")]
24 ReferenceDataError(String),
25
26 #[error(transparent)]
27 Io(#[from] std::io::Error),
28}
29
30pub type Result<T> = std::result::Result<T, BvError>;