common_failures 0.2.0

DEPRECATED: Helpers for `failure`, including io::Error wrappers with paths, quick_main!, display_causes_and_backtrace. Deprecated, because `failure` is long-deprecated.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[macro_use]
extern crate common_failures;

use std::{fs::File, path::Path};

use common_failures::prelude::*;

quick_main!(run);

fn run() -> Result<()> {
    let path = Path::new("no-such-file.txt");
    let _file = File::open(path).io_read_context(path)?;
    Ok(())
}