sos_artifact/error.rs
1//! Errors generated by the library.
2use thiserror::Error;
3
4/// Error generated by the artifact library.
5#[derive(Debug, Error)]
6pub enum Error {
7 /// Error when a platform is invalid.
8 #[error("unknown platform '{0}'")]
9 UnknownPlatform(String),
10
11 /// Error when a processor architecture is unknown.
12 #[error("unknown architecture '{0}'")]
13 UnknownArch(String),
14
15 /// Error when a distro is invalid.
16 #[error("unknown distribution '{0}'")]
17 UnknownDistro(String),
18
19 /// Error when a distribution collection is invalid.
20 ///
21 /// Supported values are currently `gui` and `cli`.
22 #[error("unknown collection '{0}'")]
23 UnknownCollection(String),
24
25 /// Error when a distribution channel is invalid.
26 #[error("unknown distribution channel '{0}'")]
27 UnknownChannel(String),
28
29 /// Error when a platform variant is invalid.
30 #[error("unknown platform variant '{0}'")]
31 UnknownVariant(String),
32}