Skip to content

Specific error messages no longer returned #228

@jdblischak

Description

@jdblischak

The recent updates to the error handling in the development versions of processx (r-lib/processx#335) and callr (#227) have broken some of my workflowr unit tests. My tests check for specific error messages, but these are no longer propagated via tryCatch(). Below is a reproducible example. Would it be possible to restore the previous behavior where the specific error message is retained?

f <- function() {
  tryCatch(
    callr::r_safe(function() stop("specific message")),
    error = function(e) e$message
  )
}

packageVersion("processx")
## [1] ‘3.6.0’
packageVersion("callr")
## [1] ‘3.7.0’
f()
## [1] "callr subprocess failed: specific message"

packageVersion("processx")
## [1] ‘3.6.0.9000’
packageVersion("callr")
## [1] ‘3.7.0.9000’
f()
## [1] "error in callr subprocess"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions