erreur 0.2.1

A tiny crate that facilitates error handling, including tracing line numbers, customizing and propagating error messages.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use erreur::*;

/// Demonstrates full catch.
/// The programmer is responsible for customizing helpful error message.
fn main() -> Resultat<()> {
    let path = "/impossible/path/!@#$%^&*()_+.file";

    // The bloody `File::open` will show "No such file or directory (os error 2)".
    // When you see this message, you have no idea which file is missing.
    // Use full catch to generate helpful error message .
    let _file = std::fs::File::open(path).catch("CannotOpenFile", path)?;

    Ok(())
}