gpAux/extensions/gps3ext/src/gpwriter.cpp
// invoked by s3_export(), need to be exception safe
invoked by s3_export(), need to be exception safe
invoked by s3_export () need to be exception safe
bool writer_transfer_data(GPWriter* writer, char* data_buf, int data_len) {
    try {
        if (!writer || !data_buf || (data_len <= 0)) {
            return false;
        }
        uint64_t write_len = writer->write(data_buf, data_len);
        CHECK_OR_DIE_MSG(write_len == (uint64_t)data_len, "%s",
                         "Failed to upload the data completely.");
    } catch (std::exception& e) {
        S3ERROR("writer_transfer_data caught an exception: %s", e.what());
        s3extErrorMessage = e.what();
        return false;
    }
    return true;
}
bool writer_transfer_data ( GPWriter * writer , char * data_buf , int data_len ) { try { if ( ! writer || ! data_buf || ( data_len <= 0 ) ) { return false ; } uint64_t write_len = writer -> write ( data_buf , data_len ) ; CHECK_OR_DIE_MSG ( write_len == ( uint64_t ) data_len , " " , " " ) ; } catch ( std :: exception & e ) { S3ERROR ( " " , e . what ( ) ) ; s3extErrorMessage = e . what ( ) ; return false ; } return true ; }
invoked by s3_export(), need to be exception safe
invoked by s3_export () need to be exception safe