macro_rules! eprint { ($($arg:tt)*) => { ... }; }
Expand description
Prints to stderr.
Equivalent to the print! macro, except that output goes to
stderr instead of stdout. See print! for
example usage.
Use eprint! only for error and progress messages. Use print!
instead for the primary output of your program.
NOTE: Not all eprint! calls will be captured in tests like std::eprint!
- Capturing will automatically be activated in test binaries
- Otherwise, only when the
testfeature is enabled
Panics
Panics if writing to stderr fails for any reason except broken pipe.
Writing to non-blocking stdout can cause an error, which will lead this macro to panic.
Examples
use anstream::eprint;
eprint!("Error: Could not complete task");