1use crate::{sourcing, templates};
4use thiserror::Error;
5
6#[derive(Error, Debug)]
8pub enum Error {
9 #[error("Failed to parse account address: {0}")]
11 AccountAddressParsing(String),
12 #[error("Anyhow error: {0}")]
14 AnyhowError(#[from] anyhow::Error),
15 #[error("Configuration error: {0}")]
17 Config(String),
18 #[error("a git error occurred: {0}")]
20 Git(String),
21 #[error("IO error: {0}")]
23 IO(#[from] std::io::Error),
24 #[error("Failed to create keypair from URI: {0}")]
26 KeyPairCreation(String),
27 #[error("Manifest error: {0}")]
29 ManifestError(#[from] cargo_toml::Error),
30 #[error("Failed to get manifest path: {0}")]
32 ManifestPath(String),
33 #[error("ParseError error: {0}")]
35 ParseError(#[from] url::ParseError),
36 #[error("Failed to parse secret URI: {0}")]
38 ParseSecretURI(String),
39 #[error("SourceError error: {0}")]
41 SourceError(#[from] sourcing::Error),
42 #[error("TemplateError error: {0}")]
44 TemplateError(#[from] templates::Error),
45 #[error("Failed to execute test command: {0}")]
47 TestCommand(String),
48 #[error("Unsupported command: {0}")]
50 UnsupportedCommand(String),
51 #[error("Unsupported platform: {arch} {os}")]
53 UnsupportedPlatform {
54 arch: &'static str,
56 os: &'static str,
58 },
59}