Macro errln::err [] [src]

macro_rules! err {
    ($($arg:tt)*) => { ... };
}

Macro for printing to the standard error.

Equivalent to the errln! macro except that a newline is not printed at the end of the message.

Note that stderr is frequently line-buffered by default so it may be necessary to use io::stderr().flush() to ensure the output is emitted immediately.

Panics

Panics if writing to io::stderr() fails.

Examples

#[macro_use]
extern crate errln;


use std::io::{self, Write};

err!("this ");
err!("will ");
err!("be ");
err!("on ");
err!("the ");
err!("same ");
err!("line ");

io::stderr().flush().unwrap();

err!("this string has a newline, why not choose errln! instead?\n");

io::stderr().flush().unwrap();