use thiserror::Error;
#[derive(Debug, Error)]
pub enum AppError {
#[error("Invalid size parameter: {size}. Must be a positive integer or 'original'")]
InvalidSize { size: String },
#[error("Size must be greater than 0, got: {size}")]
ZeroSize { size: usize },
#[error(
"No complete polarization data available for operation: {operation}. Available: {available}"
)]
IncompleDataPair {
operation: String,
available: String,
},
#[error("Missing required argument: {arg}")]
MissingArgument { arg: String },
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("SAFE reader error: {0}")]
Safe(#[from] sarpro::io::SafeError),
#[error("Cannot list remote directory: {url}. {hint}")]
RemoteDirListing { url: String, hint: String },
#[error("Provide --remote-cache-dir to cache and process: {url}. {hint}")]
CacheRequired { url: String, hint: String },
}