Skip to content

Commit 33132dc

Browse files
committed
added nocov flags
1 parent 3df05ed commit 33132dc

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
* inst/unitTests/runit.misc.R (test.bib): New test
1515

16+
* R/exceptions.R: Added #nocov
17+
1618
2017-01-11 Dirk Eddelbuettel <[email protected]>
1719

1820
* vignettes/Rcpp.bib: Updated references

R/exceptions.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois
1+
# Copyright (C) 2009 - 2017 Dirk Eddelbuettel and Romain Francois
22
#
33
# This file is part of Rcpp.
44
#
@@ -15,34 +15,34 @@
1515
# You should have received a copy of the GNU General Public License
1616
# along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
1717

18-
.rcpp_error_recorder <- function(e){
19-
invisible( .Call( rcpp_error_recorder, e ) )
18+
.rcpp_error_recorder <- function(e) {
19+
invisible(.Call(rcpp_error_recorder, e)) # #nocov
2020
}
2121

2222
.warningsEnv <- new.env()
2323
.warningsEnv$warnings <- character()
2424

2525
.rcpp_warning_recorder <- function(w){
26-
.warningsEnv$warnings <- append(.warningsEnv$warnings, w$message)
27-
invokeRestart("muffleWarning")
26+
.warningsEnv$warnings <- append(.warningsEnv$warnings, w$message) # #nocov
27+
invokeRestart("muffleWarning") # #nocov
2828
}
2929

3030
.rcpp_collect_warnings <- function() {
31-
warnings <- .warningsEnv$warnings
31+
warnings <- .warningsEnv$warnings # #nocov start
3232
.warningsEnv$warnings <- character()
33-
warnings
33+
warnings # #nocov end
3434
}
3535

3636
print.Rcpp_stack_trace <- function(x, ...) {
37-
cat(format(x, ...))
37+
cat(format(x, ...)) # #nocov
3838
}
3939

4040
str.Rcpp_stack_trace <- function(object, ...) {
41-
cat(format(object, ...))
41+
cat(format(object, ...)) # #nocov
4242
}
4343

4444
format.Rcpp_stack_trace <- function(x, ...) {
45-
paste0(
45+
paste0( # #nocov start
4646
if (nzchar(x$file)) paste0(x$file, ":", x$line),
4747
"\n ", paste(collapse = "\n ", seq_along(x$stack), ":", x$stack), "\n")
48-
}
48+
} # #nocov end

0 commit comments

Comments
 (0)