use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("{0} has been already noted by this rollback.")]
AlreadyNoted(String),
#[error("Commiting {0} failed with error: {1}.")]
Commit(String, String),
#[error("IO error: {0}")]
IO(#[from] std::io::Error),
#[error("{0} already exists and cannot be noted as 'new'.")]
NewItemAlreadyExists(String),
#[error("{0} isn't a dir.")]
NotADir(String),
#[error("{0} isn't a file.")]
NotAFile(String),
#[error("The path {0} has been noted several times as new_dir.")]
RepeatedNewDir(String),
#[error("The path {0} has been noted several times as new_file.")]
RepeatedNewFile(String),
}