use std::path::PathBuf;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum VibeBlogError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Failed to read file: {path}")]
FileRead {
path: PathBuf,
source: std::io::Error,
},
#[error("Failed to write file: {path}")]
FileWrite {
path: PathBuf,
source: std::io::Error,
},
#[error("Git error: {0}")]
Git(#[from] git2::Error),
#[error("Image processing error: {0}")]
Image(#[from] image::ImageError),
#[error("Layout not found: {0}")]
LayoutNotFound(String),
#[error("Invalid date format in filename: {0}")]
InvalidDateFormat(String),
#[error("Parse error: {message}")]
Parse { message: String },
#[error("Configuration error: {0}")]
Config(String),
}
pub type Result<T> = std::result::Result<T, VibeBlogError>;