Skip to content
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

purrr:::capture_output() should use conditionMessage() not $message #1010

Closed
DavisVaughan opened this issue Dec 15, 2022 · 0 comments · Fixed by #1012
Closed

purrr:::capture_output() should use conditionMessage() not $message #1010

DavisVaughan opened this issue Dec 15, 2022 · 0 comments · Fixed by #1012

Comments

@DavisVaughan
Copy link
Member

DavisVaughan commented Dec 15, 2022

> purrr:::capture_output
function (code) 
{
    warnings <- character()
    wHandler <- function(w) {
        warnings <<- c(warnings, w$message)
        invokeRestart("muffleWarning")
    }
    messages <- character()
    mHandler <- function(m) {
        messages <<- c(messages, m$message)
        invokeRestart("muffleMessage")
    }

To give things like rlang:::conditionMessage.rlang_error a chance to run correctly

hadley added a commit that referenced this issue Dec 18, 2022
hadley added a commit that referenced this issue Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant