1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use thiserror::Error as ThisError;
#[derive(Debug, ThisError)]
pub enum Error {
#[error("IO error: `{0}`")]
IoError(#[from] std::io::Error),
#[error("non-UTF-8 string")]
Utf8Error,
#[error("capture group does not exist")]
CaptureError,
#[error("could not find any files to parse")]
EmptyFileListError,
#[error("required file missing: `{0}`")]
MissingFileError(String),
#[error("glob error: `{0}`")]
GlobError(#[from] globwalk::GlobError),
#[error("regex error: `{0}`")]
RegexError(#[from] regex::Error),
}