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

Improved exception infrastructure #676

Merged
merged 2 commits into from Apr 18, 2017

Conversation

Projects
None yet
3 participants
@coatless
Contributor

coatless commented Apr 17, 2017

This is PR 2 of 3.

Contained within this PR is the necessary upgrade to the exception infrastructure to proceed with improving internal exception messages.

The third PR aims to provide the improved internal exception messages based on the proposal table in #184.

(The first PR was the upstream refresh of the tinyformat library.)


Changes:

  • Added local mod in tinyformat to enable variadic templates if C++11 is detected.
  • Created a C++11 exception message version using variadic templates for Rcpp::stop, Rcpp::warning, and RCPP_ADVANCED_EXCEPTION_CLASS
  • Added C++98 exception message version using generated macro arguments.
  • Extracted generated Rcpp::stop and Rcpp::warning functions from exception.h and moved them into C++98 exception header
  • Modified RCPP_EXCEPTION_CLASS macro to have a default ctor that returns a default constructed string to allow for promotion without breaking present use.
  • Promoted no_such_slot and not_a_closure to use RCPP_EXCEPTION_CLASS from RCPP_SIMPLE_EXCEPTION_CLASS.
  • Promoted index_out_of_bounds and not_compatible to use RCPP_ADVANCED_EXCEPTION_CLASS.
  • Flagged no_such_field and reference_creation_class for potential removal.
@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Apr 17, 2017

Codecov Report

Merging #676 into master will decrease coverage by 0.02%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #676      +/-   ##
==========================================
- Coverage   92.91%   92.88%   -0.03%     
==========================================
  Files          65       65              
  Lines        3302     3303       +1     
==========================================
  Hits         3068     3068              
- Misses        234      235       +1
Impacted Files Coverage Δ
inst/include/Rcpp/exceptions.h 50% <50%> (-50%) ⬇️

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 052089b...b022854. Read the comment docs.

codecov-io commented Apr 17, 2017

Codecov Report

Merging #676 into master will decrease coverage by 0.02%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #676      +/-   ##
==========================================
- Coverage   92.91%   92.88%   -0.03%     
==========================================
  Files          65       65              
  Lines        3302     3303       +1     
==========================================
  Hits         3068     3068              
- Misses        234      235       +1
Impacted Files Coverage Δ
inst/include/Rcpp/exceptions.h 50% <50%> (-50%) ⬇️

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 052089b...b022854. Read the comment docs.

@eddelbuettel

Looks good to me at first glance.

Reverse depend check running too.

@eddelbuettel

This comment has been minimized.

Show comment
Hide comment
@eddelbuettel

eddelbuettel Apr 17, 2017

Member

It seems to make some noise in other project though ... when -pedantic -Wextra is used. Falling back to -Wno-unused quiets it down a little.

Member

eddelbuettel commented Apr 17, 2017

It seems to make some noise in other project though ... when -pedantic -Wextra is used. Falling back to -Wno-unused quiets it down a little.

@eddelbuettel eddelbuettel merged commit 25c2369 into RcppCore:master Apr 18, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@coatless

This comment has been minimized.

Show comment
Hide comment
@coatless

coatless Apr 23, 2017

Contributor

Modifications to the C++98 macro to remove ; were done in:

e08d088 and 138454e

Contributor

coatless commented Apr 23, 2017

Modifications to the C++98 macro to remove ; were done in:

e08d088 and 138454e

@coatless coatless deleted the coatless:feature/improved-exception-messages-v2 branch Aug 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment