Skip to content

Instantly share code, notes, and snippets.

@tailhook
Created May 18, 2016 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tailhook/631fb31882aaa99cc19336b3cc7c8f11 to your computer and use it in GitHub Desktop.
Save tailhook/631fb31882aaa99cc19336b3cc7c8f11 to your computer and use it in GitHub Desktop.
quick_error! {
#[derive(Debug)]
pub enum Error {
Io(err: io::Error, path: PathBuf) {
display("could not read file {:?}: {}", path, err)
context(path: &'a Path, err: io::Error)
-> (err, path.to_path_buf())
}
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment