scanit/error.rs
1
2
3use std::io::Error as IoError;
4use thiserror::Error;
5use ignore::Error as WalkError;
6use regex::Error as RegexError;
7#[derive(Error, Debug)]
8pub enum ScanError {
9 #[error("I/O error: {0}")]
10 Io(#[from] IoError),
11 #[error("Regex error, consider using -r to escape the Regex: {0:?}")]
12 Regex(#[from] RegexError),
13 #[error("Directory traversal error: {0}")]
14 Walk(#[from] WalkError),
15 #[error("Scanit error: {0}")]
16 Other(String),
17}