mint_cli/layout/
errors.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum LayoutError {
5    #[error("File error: {0}.")]
6    FileError(String),
7
8    #[error("Block not found: {0}.")]
9    BlockNotFound(String),
10
11    #[error("Data value export failed: {0}.")]
12    DataValueExportFailed(String),
13
14    #[error("Invalid block argument: {0}.")]
15    InvalidBlockArgument(String),
16
17    #[error("No blocks provided.")]
18    NoBlocksProvided,
19
20    #[error("Missing datasheet: {0}")]
21    MissingDataSheet(String),
22
23    #[error("In field '{field}': {source}")]
24    InField {
25        field: String,
26        #[source]
27        source: Box<LayoutError>,
28    },
29
30    #[error(transparent)]
31    Variant(#[from] crate::variant::errors::VariantError),
32}