use error_chain::error_chain;
use std::fmt;
use std::io;
use std::path::PathBuf;
error_chain! {
types {
Error, ErrorKind, ResultExt;
}
foreign_links {
FmtError(fmt::Error);
IoError(io::Error);
ParseError(syn::Error);
RegexError(regex::Error);
}
errors {
SourceFileNotFound(p: PathBuf) {
description("Source file not found"),
display("Source file {:?} not found", p)
}
InvalidRuleName(name: String) {
description("Invalid Rule name"),
display("Invalid Rule name: {:?}", name)
}
}
}