Skip to content

Instantly share code, notes, and snippets.

@tailhook
Last active Sep 21, 2015
Embed
What would you like to do?
quick_error_primer
#[macro_use] extern crate quick_error;
quick_error! {
#[derive(Debug)]
pub enum SomeError {
Io(err: io::Error, path: PathBuf) {
display("I/O error at {path}: {err}", err=err, path=path)
description(err.description())
}
ApplicationError
}
}
#[macro_use] extern crate quick_error;
quick_error! {
#[derive(Debug)]
pub enum SomeError {
Io(err: io::Error) {
from()
display("I/O error: {}", err)
description(err.description())
}
ApplicationError
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment