public static SQLException handle(ClickHouseException e) {
        return e != null ? new SQLException(e.getMessage(), toSqlState(e), e.getErrorCode(), e.getCause())
                : unknownError();
    }
Helper class for building {@link SQLException}.
clickhouse-jdbc/src/main/java/com/clickhouse/jdbc/SqlExceptionUtils.java