1#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum BundleError {
7 #[error("invalid bundle archive: {0}")]
9 Archive(String),
10 #[error("invalid bundle manifest: {0}")]
12 Manifest(String),
13 #[error("bundle integrity check failed: {0}")]
15 Integrity(String),
16 #[error("bundle signature: {0}")]
18 Signature(String),
19 #[error("bundle workflow `{name}`: {message}")]
21 Workflow { name: String, message: String },
22 #[error("{0}")]
24 Secret(String),
25 #[error("bundle build: {0}")]
27 Build(String),
28 #[error("bundled plugin `{plugin}`: {message}")]
30 Plugin { plugin: String, message: String },
31 #[error("{path}: {message}")]
33 Io { path: String, message: String },
34}
35
36impl BundleError {
37 pub(crate) fn io(path: &std::path::Path, e: &std::io::Error) -> Self {
38 Self::Io { path: path.display().to_string(), message: e.to_string() }
39 }
40}