René's URL Explorer Experiment


Title: Consider masking definition of Rf_error()? · Issue #1247 · RcppCore/Rcpp · GitHub

Open Graph Title: Consider masking definition of Rf_error()? · Issue #1247 · RcppCore/Rcpp

X Title: Consider masking definition of Rf_error()? · Issue #1247 · RcppCore/Rcpp

Description: Somewhat related to a recent post on R-devel, some users will still try to use Rf_error() in C++ code using Rcpp. However, (as is documented) C++ destructors won't run when a longjmp occurs in cases like this. For example: #include

Open Graph Description: Somewhat related to a recent post on R-devel, some users will still try to use Rf_error() in C++ code using Rcpp. However, (as is documented) C++ destructors won't run when a longjmp occurs in case...

X Description: Somewhat related to a recent post on R-devel, some users will still try to use Rf_error() in C++ code using Rcpp. However, (as is documented) C++ destructors won't run when a longjmp occurs in ...

Opengraph URL: https://github.com/RcppCore/Rcpp/issues/1247

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider masking definition of Rf_error()?","articleBody":"Somewhat related to a recent post on R-devel, some users will still try to use `Rf_error()` in C++ code using Rcpp. However, (as is documented) C++ destructors won't run when a longjmp occurs in cases like this. For example:\r\n\r\n`````\r\n#include \u003cRcpp.h\u003e\r\nusing namespace Rcpp;\r\n\r\nstruct A {\r\n    A() { Rprintf(\"A()\\n\"); }\r\n    ~A() { Rprintf(\"~A()\\n\"); }\r\n};\r\n\r\n// [[Rcpp::export]]\r\nSEXP uhoh() {\r\n    A a;\r\n    Rf_error(\"Oops!\");\r\n}\r\n\r\n/*** R\r\nuhoh()\r\n*/\r\n`````\r\n\r\nIn this example, `~A()` is never printed.\r\n\r\nWe could consider masking the definition of `Rf_error()` in these contexts. For example, something like:\r\n\r\n```\r\n#define Rf_error(...) \\\r\n    static_assert(false, \"Use of Rf_error() in C++ contexts is unwise: consider using Rcpp::stop() instead.\");\r\n```\r\n\r\nThere might also be a way to provide our own definition of `Rf_error()` that \"masks\" the version provided by R, but I wasn't able to find something immediately obvious.","author":{"url":"https://github.com/kevinushey","@type":"Person","name":"kevinushey"},"datePublished":"2023-01-31T00:48:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":25},"url":"https://github.com/1247/Rcpp/issues/1247"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8b0a18e0-f376-45db-987c-3bc269f95bf7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC42E:166B1C:18AEC69:227FAC1:6970DA53
html-safe-nonceac4b946d47154eac90d6a1725f496a77f75517faacb45f885d3b3b1ae64ca80b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDJFOjE2NkIxQzoxOEFFQzY5OjIyN0ZBQzE6Njk3MERBNTMiLCJ2aXNpdG9yX2lkIjoiNjc4NDYwNjI5NDE3OTM3MTYwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac93e9913cdbe06b42b90eff4aa7d3d052ec3d5079a662ac1c2931b385fdaf5188
hovercard-subject-tagissue:1563436961
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RcppCore/Rcpp/1247/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b6a2a01ea78949ef92c0cded7cbf8da8b88e3b773b3c04e44a1331bef107ba3d/RcppCore/Rcpp/issues/1247
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b6a2a01ea78949ef92c0cded7cbf8da8b88e3b773b3c04e44a1331bef107ba3d/RcppCore/Rcpp/issues/1247
og:image:altSomewhat related to a recent post on R-devel, some users will still try to use Rf_error() in C++ code using Rcpp. However, (as is documented) C++ destructors won't run when a longjmp occurs in case...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekevinushey
hostnamegithub.com
expected-hostnamegithub.com
Noneb9203e7efc62065329c3b7015a1e6d16fc14bce440abec7b0d3cbe9e4fb1e2e4
turbo-cache-controlno-preview
go-importgithub.com/RcppCore/Rcpp git https://github.com/RcppCore/Rcpp.git
octolytics-dimension-user_id5811336
octolytics-dimension-user_loginRcppCore
octolytics-dimension-repository_id14005591
octolytics-dimension-repository_nwoRcppCore/Rcpp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14005591
octolytics-dimension-repository_network_root_nwoRcppCore/Rcpp
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseeb3c92b74ae48a78cffd8700b8eb5f60bad61528
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues/1247#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FRcppCore%2FRcpp%2Fissues%2F1247
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FRcppCore%2FRcpp%2Fissues%2F1247
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=RcppCore%2FRcpp
Reloadhttps://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues/1247
Reloadhttps://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues/1247
Reloadhttps://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues/1247
RcppCore https://patch-diff.githubusercontent.com/RcppCore
Rcpphttps://patch-diff.githubusercontent.com/RcppCore/Rcpp
Please reload this pagehttps://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues/1247
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FRcppCore%2FRcpp
Fork 221 https://patch-diff.githubusercontent.com/login?return_to=%2FRcppCore%2FRcpp
Star 784 https://patch-diff.githubusercontent.com/login?return_to=%2FRcppCore%2FRcpp
Code https://patch-diff.githubusercontent.com/RcppCore/Rcpp
Issues 4 https://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues
Pull requests 3 https://patch-diff.githubusercontent.com/RcppCore/Rcpp/pulls
Discussions https://patch-diff.githubusercontent.com/RcppCore/Rcpp/discussions
Actions https://patch-diff.githubusercontent.com/RcppCore/Rcpp/actions
Projects 0 https://patch-diff.githubusercontent.com/RcppCore/Rcpp/projects
Wiki https://patch-diff.githubusercontent.com/RcppCore/Rcpp/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/RcppCore/Rcpp/security
Please reload this pagehttps://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues/1247
Insights https://patch-diff.githubusercontent.com/RcppCore/Rcpp/pulse
Code https://patch-diff.githubusercontent.com/RcppCore/Rcpp
Issues https://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues
Pull requests https://patch-diff.githubusercontent.com/RcppCore/Rcpp/pulls
Discussions https://patch-diff.githubusercontent.com/RcppCore/Rcpp/discussions
Actions https://patch-diff.githubusercontent.com/RcppCore/Rcpp/actions
Projects https://patch-diff.githubusercontent.com/RcppCore/Rcpp/projects
Wiki https://patch-diff.githubusercontent.com/RcppCore/Rcpp/wiki
Security https://patch-diff.githubusercontent.com/RcppCore/Rcpp/security
Insights https://patch-diff.githubusercontent.com/RcppCore/Rcpp/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/RcppCore/Rcpp/issues/1247
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/RcppCore/Rcpp/issues/1247
#1402https://github.com/RcppCore/Rcpp/pull/1402
Consider masking definition of Rf_error()?https://patch-diff.githubusercontent.com/RcppCore/Rcpp/issues/1247#top
#1402https://github.com/RcppCore/Rcpp/pull/1402
https://github.com/kevinushey
https://github.com/kevinushey
kevinusheyhttps://github.com/kevinushey
on Jan 31, 2023https://github.com/RcppCore/Rcpp/issues/1247#issue-1563436961
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.