Skip to content

Commit

Permalink
Harmonize rapi_execute()
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Oct 20, 2024
1 parent 771ba49 commit eb38b2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/statement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,16 @@ bool FetchArrowChunk(ChunkScanState &scan_state, ClientProperties options, Appen

auto generic_result = stmt->stmt->Execute(stmt->parameters, false);

if (generic_result->HasError()) {
if (signal_handler.HandleInterrupt()) {
return R_NilValue;
}
cpp11::stop("rapi_execute: Failed to run query\nError: %s", generic_result->GetError().c_str());
if (signal_handler.HandleInterrupt()) {
return R_NilValue;
}

signal_handler.Disable();

if (generic_result->HasError()) {
cpp11::stop("rapi_execute: Failed to run query\nError: %s", generic_result->GetError().c_str());
}

if (arrow) {
auto query_result = new RQueryResult();
query_result->result = std::move(generic_result);
Expand Down

0 comments on commit eb38b2b

Please sign in to comment.