Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling is no longer correct #191

Open
jcheng5 opened this issue Oct 25, 2024 · 0 comments · May be fixed by #192
Open

Error handling is no longer correct #191

jcheng5 opened this issue Oct 25, 2024 · 0 comments · May be fixed by #192

Comments

@jcheng5
Copy link
Member

jcheng5 commented Oct 25, 2024

Multiple tests in test-run_now.R are failing; we didn't catch this because they're disabled on ci.

In test-run_now.R, there are tests that test what happens if a callback:

  1. throws an error while run_now is called
  2. is interrupted while run_now is called

Tests in the second category apparently don't work on CRAN or CI environments. But tests in the first should be fine, and they've started failing since this commit in Rcpp (between 1.0.9 and 1.0.10, in 2022):

RcppCore/Rcpp@d389a8a

The problem is that our invoke_wrapped() logic assumes that Rcpp's unwind protect feature is not in use, and the default became to use it. With unwind protect, the right thing to do is almost to just call invoke() directly and not use invoke_wrapped() at all. I say almost, because this works great for errors but not for interrupts--the interrupts somehow aren't caught by tryCatch(..., interrupt = ...) so the tests abruptly end.

@jcheng5 jcheng5 linked a pull request Oct 25, 2024 that will close this issue
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 a pull request may close this issue.

1 participant