gen_changelog/
error.rs

1use thiserror::Error;
2
3/// Error messages for the gen-changelog crate
4#[derive(Debug, Error)]
5pub enum Error {
6    /// url not found
7    #[error("url not found")]
8    UrlNotFound,
9    /// capture groups not found
10    #[error("capture groups not found")]
11    CapturesNotFound,
12    /// owner not found in capture group
13    #[error("owner not found in capture group")]
14    OwnerNotFound,
15    /// repo not found in capture group
16    #[error("repo not found in capture group")]
17    RepoNotFound,
18    /// no rust package found in repository
19    #[error("no rust package found in repository")]
20    NoPackageFound,
21    /// Error from the git2 crate
22    #[error("Git2 says: {0}")]
23    Git2Error(#[from] git2::Error),
24    /// Error from the std io
25    #[error("io error: {0}")]
26    IOError(#[from] std::io::Error),
27    /// Error from the toml serializer
28    #[error("toml serializer error: {0}")]
29    TomlSerError(#[from] toml::ser::Error),
30    /// Error from the toml serializer
31    #[error("toml deserializer error: {0}")]
32    TomlDeError(#[from] toml::de::Error),
33    // /// Error from the regex crate
34    // #[error("Regex says: {0}")]
35    // RegexError(#[from] regex::Error),
36}