Skip to content

TableSlice::print_tty() should not panic on I/O errors #140

Open
@koutheir

Description

@koutheir

Currently, TableSlice::print_tty() panics on I/O errors. I think it should return an error instead of panicking, because I/O errors are not exceptional situations. Panics are reserved to exceptional situations.

For example, failing to write to the standard output due to a broken pipe (EPIPE) is very common when commands are piped to head, tail, more, etc. The current behavior causes applications using this crate to panic when that happens, instead of simply exiting. See issue 16 in bingrep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions