use chrono::ParseError;
use glob::{GlobError, PatternError};
use inquire::InquireError;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Errors {
#[error("an I/O error has occurred")]
IOError(#[from] tokio::io::Error),
#[error("error occurred while displaying options")]
PromptError(#[from] InquireError),
#[error("error occurred while deserializing the TOML file")]
TomlDeserializingError(#[from] toml::de::Error),
#[error("failed to parse the pattern")]
ParsePatternError(#[from] PatternError),
#[error("unable to read the path for iteration")]
IterationError(#[from] GlobError),
#[error("failed to parse the date")]
ParseDateError(#[from] ParseError),
#[error("file does not exist")]
FileNotExistError,
}