Skip to content

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

@DavisVaughan

Description

@DavisVaughan
> 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions