extern crate error_chain;
extern crate toml;
extern crate walkdir;
extern crate ansi_term;
extern crate serde_json;
extern crate log;
extern crate regex;
error_chain! {
types {
YabsError, YabsErrorKind, Result;
}
foreign_links {
Io(::std::io::Error);
TomlDe(::toml::de::Error);
WalkDir(::walkdir::Error);
SetLog(::log::SetLoggerError);
UTF8(::std::string::FromUtf8Error);
Regex(::regex::Error);
}
errors {
NoAssumedToml(path: String) {
description("no assumed toml file found")
display("could not find assumed toml file in '{}' or in any parent directory", path)
}
Command(cmd: String, status: i32) {
description("command exited unsuccessfully")
display("command '{}' exited with status '{}'", cmd, status)
}
DirExists(path: ::std::path::PathBuf) {
description("directory already exists")
display("directory '{}' already exists", path.display())
}
TargetNotFound(ttype: String, name: String) {
description("target not found")
display("no {} with name '{}' found", ttype, name)
}
}
}