Ignore errors when printing to stderr

This commit is contained in:
Sebastian Dröge 2016-05-15 11:48:45 +03:00
parent fdab33f01b
commit da1f869b47

View file

@ -2,7 +2,11 @@
macro_rules! println_err(
($($arg:tt)*) => { {
let r = writeln!(&mut ::std::io::stderr(), $($arg)*);
r.expect("failed printing to stderr");
// Ignore when writing fails
match r {
Ok(_) => (),
Err(_) => ()
};
} }
);