presto-cli/src/main/java/io/prestosql/cli/CsvPrinter.java/CsvPrinter/checkError
class CsvPrinter:    private void checkError()
            throws IOException
    {
        if (writer.checkError()) {
            throw new IOException("error writing to output");
        }
    }