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

Added support for throwing exceptions without call stacks. #663

Merged

Conversation

jimhester
Copy link
Contributor

There is currently no way to generate an exception from Rcpp which does not have an attached R (and cpp) call stacks. This extra information can be confusing for users, so it is useful to be able to disable it if desired (like stop(call. = FALSE) does in R code.

This could be implemented by providing overloaded forward_exception_to_r()and exception_to_r_condition() functions for Rcpp::exceptions, but I felt like it made the intention more clear to define new functions instead.

@eddelbuettel
Copy link
Member

Did you see Contributing.md ?

@jimhester jimhester force-pushed the exceptions_without_callstacks branch from dc7694c to a15ba45 Compare April 3, 2017 20:23
@jimhester
Copy link
Contributor Author

Yes, but not until this was already implemented, since it was already done might as well look at the code

@codecov-io
Copy link

codecov-io commented Apr 3, 2017

Codecov Report

Merging #663 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #663   +/-   ##
=======================================
  Coverage   92.91%   92.91%           
=======================================
  Files          65       65           
  Lines        3303     3303           
=======================================
  Hits         3069     3069           
  Misses        234      234
Impacted Files Coverage Δ
inst/include/Rcpp/exceptions.h 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 886f5df...a15ba45. Read the comment docs.

@jimhester jimhester closed this Apr 4, 2017
@eddelbuettel eddelbuettel reopened this Apr 9, 2017
@eddelbuettel
Copy link
Member

Meant to reopen this earlier after we all seemed to have reached consensus on #664, but got sidetracked.

@eddelbuettel
Copy link
Member

This looks fine to me. Any other takers?

@kevinushey
Copy link
Contributor

+1

@eddelbuettel eddelbuettel merged commit 43e53b0 into RcppCore:master Apr 11, 2017
eddelbuettel added a commit that referenced this pull request Apr 11, 2017
commit 43e53b0
Merge: 886f5df a15ba45
Author: Dirk Eddelbuettel <edd@debian.org>
Date:   Tue Apr 11 13:20:10 2017 -0500

    Merge pull request #663 from jimhester/exceptions_without_callstacks

    Added support for throwing exceptions without call stacks.

commit a15ba45
Author: Jim Hester <james.f.hester@gmail.com>
Date:   Mon Apr 3 16:11:24 2017 -0400

    Added support for throwing exceptions without call stacks.
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.

None yet

4 participants