quick_error!
{
#[derive(Debug)]
pub enum StylesheetError
{
Io(path: PathBuf, cause: ::std::io::Error)
{
cause(cause)
description(cause.description())
display("I/O error with {:?} was '{}'", path, cause)
context(path: &'a Path, cause: ::std::io::Error) -> (path.to_path_buf(), cause)
}
Format(path: PathBuf, cause: ::std::fmt::Error)
{
cause(cause)
description(cause.description())
display("Format error with {:?} was '{}'", path, cause)
context(path: &'a Path, cause: ::std::fmt::Error) -> (path.to_path_buf(), cause)
}
Parse(path: PathBuf, source_location: SourceLocation, reason: String)
{
description(&reason)
display("Parse error with {:?} at '{:?}' was '{}'", path, source_location, &reason)
}
}
}