1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
use sic_parser::errors::SicParserError; use thiserror::Error; #[derive(Debug, Error, PartialEq, Eq)] pub enum SicCliOpsError { #[error("Unable to parse: {0}")] ParserError(#[from] SicParserError), #[error("Failed to parse value of type {typ} ({err})")] UnableToParseValueOfType { err: SicParserError, typ: String }, #[error( "Unification of multi valued argument(s) failed: arguments couldn't be \ partitioned in correct chunk sizes. Length of chunk: {0}" )] UnableToCorrectlyPartitionMultiParamArguments(usize), #[error( "Unification of multi valued argument(s) failed: \ When using an image operation cli argument which requires n values, \ all values should be provided at once. For example, `--crop` takes 4 values \ so, n=4. Now, `--crop 0 0 1 1` would be valid, but `--crop 0 0 --crop 1 1` would not." )] UnableToUnifyMultiValuedArguments, #[error("Values which take no arguments can't be unified")] UnableToUnifyBareValues, }