use super::Command;
error_chain! {
foreign_links {
Io(::std::io::Error);
Utf8(std::str::Utf8Error);
Regex(regex::Error);
Json(serde_json::Error);
GlobPattern(glob::PatternError);
Log(log::SetLoggerError);
}
errors {
PathExists(p: std::path::PathBuf) {
display("path exists: '{}'",p.display())
}
PathDoesNotExist(p: std::path::PathBuf) {
display("path does not exist: '{}'",p.display())
}
UnrecognizedCommand(command: String) {
description("an unrecognized command"),
display("unrecognized command '{}'",command)
}
ShebangNotFound(p: std::path::PathBuf) {
display("shebang not found for '{}'",p.display())
}
CommandFailed(c: Command) {
description("a command execution failed"),
display("{}",c.to_err_string())
}
}
}