public static void handleCustomAction(Runnable postCloseAction) throws IOException {
        if (postCloseAction == null) {
            return;
        }

        try {
            postCloseAction.run();
        } catch (UncheckedIOException e) {
            throw e.getCause();
        }
    }
Handles custom action.

@param postCloseAction post close action, could be null
@throws IOException when failed to execute post close action
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseDataStreamFactory.java