use thiserror::Error;
#[derive(Error, Debug)]
pub enum GftoolsError {
#[error("problem parsing font: {0}")]
FontParse(#[from] skrifa::raw::ReadError),
#[error("problem writing font: {0}")]
FontWrite(#[from] write_fonts::error::Error),
#[error("problem building font: {0}")]
FontBuild(#[from] write_fonts::BuilderError),
#[error("problem parsing JSON: {0}")]
JsonParse(#[from] serde_json_path_to_error::Error),
#[error("problem parsing TOML: {0}")]
TomlParse(#[from] toml::de::Error),
#[error("problem reading file: {0}")]
FileRead(#[from] std::io::Error),
#[error("miscellaneous error: {0}")]
Misc(String),
#[error("problem parsing protobuf: {0}")]
ProtobufParse(#[from] protobuf::text_format::ParseError),
#[error("HTTP error: {0}")]
HttpError(#[from] reqwest::Error),
#[error("Error opening git repository: {0}")]
GitOpen(#[from] gix::open::Error),
#[error("Network error using git: {0}")]
GitNetwork(String),
#[error("general git error: {0}")]
Git(String),
#[error("Error communicating with GitHub: {0}")]
GitHub(String),
}