From 4b308ec2a1d880491e9630d8c229fdab156748bc Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Wed, 24 Jun 2015 14:17:16 -0400 Subject: [PATCH] Use traceback instead of dump.frame traceback properly ignores errors inside of try blocks, so it is safe to use as the default error handler. Fixes #88 --- DESCRIPTION | 2 +- R/subprocess.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d26f5b86..39f21eb9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: covr Title: Test Coverage for Packages -Version: 1.1.2 +Version: 1.2.0 Authors@R: person("Jim", "Hester", email = "james.f.hester@gmail.com", role = c("aut", "cre")) Description: Track and report code coverage for your package and (optionally) upload the results to a coverage service like Codecov (http://codecov.io) diff --git a/R/subprocess.R b/R/subprocess.R index d676f670..4dfb9b79 100644 --- a/R/subprocess.R +++ b/R/subprocess.R @@ -30,7 +30,7 @@ subprocess <- function(code, calling_env = parent.frame(), command <- sprintf( paste(sep = "\n", - "options(error = quote({dump.frames(to.file = TRUE); q(status = 1)}))", + "options(error = function() traceback(2))", "options(warn = 1)", "load('%s')", ".code <- readRDS('%s')",