Skip to content

Poor error message when "missing" format objects #114

@MichaelChirico

Description

@MichaelChirico

I made the mistake not to include some of the named elements & was met with a very strange error it took me a while to figure out:

Error in as.character(.transformer(expr, env)) :
cannot coerce type 'closure' to vector of type 'character'

This is because my input was actually a named function (and even though closure should have been a dead giveaway on this I spent 10 minutes + debugging):

glue::glue_data(list(x = 1), '{x} cannot be bigger than {stop}')

I'm not sure any easy way to fix this/give a more helpful message, but if so it could save time debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-day

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions