pub fn write_error(writer: impl Write, text: &str) -> Result<()>
Writes error text to a generic writer.
Returns any I/O error reported by writer.
writer