Skip to content

Replace remaining Rf_error calls with Rcpp::stop#112

Merged
eddelbuettel merged 2 commits intomasterfrom
feature/remove_rf_error
Feb 28, 2026
Merged

Replace remaining Rf_error calls with Rcpp::stop#112
eddelbuettel merged 2 commits intomasterfrom
feature/remove_rf_error

Conversation

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Feb 28, 2026

See RcppCore/Rcpp#1247 for context

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to eliminate remaining Rf_error() usages in the C++ code by replacing them with Rcpp::stop(), aligning error handling with Rcpp’s exception-based unwinding.

Changes:

  • Replace Rf_error() with Rcpp::stop() in a stream wrapper, the descriptor pool lookup remove callback, and a socket error macro.
  • Update Flexelint configuration to remove the Rf_error “no return” reference.
  • Bump package version/date and record changes in ChangeLog.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/wrapper_ZeroCopyInputStream.cpp Switches ZeroCopyInputStream_BackUp argument validation error to Rcpp::stop().
src/lookup.cpp Replaces Rf_error() with Rcpp::stop() in rProtoBufTable_remove.
src/rprotobuf.h Updates THROW_SOCKET_ERROR macro to use Rcpp::stop().
src/std.lnt Removes lint config entry referencing Rf_error.
DESCRIPTION Version/date bump.
ChangeLog Documents the replacements and lint update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@eddelbuettel eddelbuettel merged commit 39bdc3a into master Feb 28, 2026
8 checks passed
@eddelbuettel eddelbuettel deleted the feature/remove_rf_error branch March 4, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants