Created
August 22, 2016 06:10
-
-
Save anonymous/a2501d1b27bbc42c0cbdcf39167ed164 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains hidden or 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
| fn main() { | |
| match failme() { | |
| Err(e) => panic!(e), | |
| _ => unreachable!() | |
| } | |
| } | |
| fn failme() -> Result<(), String> { | |
| Err(format!("Oops! An error happened in {} on line {}", file!(), line!())) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment