Created
September 21, 2015 15:56
-
-
Save tailhook/635301e241b580f75aeb to your computer and use it in GitHub Desktop.
quick-error-example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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