|
1 | | -# Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois |
| 1 | +# Copyright (C) 2009 - 2017 Dirk Eddelbuettel and Romain Francois |
2 | 2 | # |
3 | 3 | # This file is part of Rcpp. |
4 | 4 | # |
|
15 | 15 | # You should have received a copy of the GNU General Public License |
16 | 16 | # along with Rcpp. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 |
|
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 |
20 | 20 | } |
21 | 21 |
|
22 | 22 | .warningsEnv <- new.env() |
23 | 23 | .warningsEnv$warnings <- character() |
24 | 24 |
|
25 | 25 | .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 |
28 | 28 | } |
29 | 29 |
|
30 | 30 | .rcpp_collect_warnings <- function() { |
31 | | - warnings <- .warningsEnv$warnings |
| 31 | + warnings <- .warningsEnv$warnings # #nocov start |
32 | 32 | .warningsEnv$warnings <- character() |
33 | | - warnings |
| 33 | + warnings # #nocov end |
34 | 34 | } |
35 | 35 |
|
36 | 36 | print.Rcpp_stack_trace <- function(x, ...) { |
37 | | - cat(format(x, ...)) |
| 37 | + cat(format(x, ...)) # #nocov |
38 | 38 | } |
39 | 39 |
|
40 | 40 | str.Rcpp_stack_trace <- function(object, ...) { |
41 | | - cat(format(object, ...)) |
| 41 | + cat(format(object, ...)) # #nocov |
42 | 42 | } |
43 | 43 |
|
44 | 44 | format.Rcpp_stack_trace <- function(x, ...) { |
45 | | - paste0( |
| 45 | + paste0( # #nocov start |
46 | 46 | if (nzchar(x$file)) paste0(x$file, ":", x$line), |
47 | 47 | "\n ", paste(collapse = "\n ", seq_along(x$stack), ":", x$stack), "\n") |
48 | | -} |
| 48 | +} # #nocov end |
0 commit comments