Macro trackable::track_any_err [−][src]
The abbreviation of track!($target.map_err(Failure::from_error), ..)
.
Examples
use std::sync::mpsc; use trackable::error::{Failed, ErrorKindExt}; let rx = mpsc::channel::<()>().1; let result = track_any_err!(rx.recv(), "sender dropped"); assert_eq!(format!("\n{}", result.err().unwrap()).replace('\\', "/"), r#" Failed (cause; receiving on a closed channel) HISTORY: [0] at src/macros.rs:10 -- sender dropped "#);