use error_chain::error_chain;
error_chain! {
foreign_links {
I3EstablishError(::i3ipc::EstablishError)
#[doc = "Error caused by `i3ipc`, on establishing a connection."];
I3MessageError(::i3ipc::MessageError)
#[doc = "Error caused by `i3ipc`, on sending a message."];
IoError(::std::io::Error)
#[doc = "Error mapping to `std::io::Error`."];
Utf8Error(::std::str::Utf8Error)
#[doc = "Error mapping to `std::str::Utf8Error`."];
TomlError(::toml::de::Error)
#[doc = "Error caused by `toml`, on deserializing using Serde."];
}
errors {
CantBeImplemented(t: String) {
description("called function cannot be implemented")
display("called function cannot be implemented: '{}'", t)
}
CommandSplittingFailed(t: String) {
description("command splitting failed")
display("command splitting failed: '{}'", t)
}
ConfigExists(p: String, t: String) {
description("config already exists")
display("config of type '{}' already exists: '{}'", p, t)
}
EditorNotFound {
description("cannot find an editor")
display("cannot find an editor. Please specify $VISUAL or $EDITOR")
}
InvalidUtF8Path(t: String) {
description("path is invalid UTF8")
display("path is invalid UTF8: '{}'", t)
}
PathDoesntExist(t: String) {
description("path doesn't exist")
display("path doesn't exist: '{}'", t)
}
TextOrKeyInputFailed {
description("text or key input failed")
display("inputting text or key-presses into an application failed")
}
UnknownConfig(p: String, t: String) {
description("config is unknown")
display("config of type '{}' is unknown: '{}'", p, t)
}
}
}