-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
featurea feature request or enhancementa feature request or enhancement
Description
library(dplyr)
df <- tibble(x = 1:2, y = 3:4)
fn <- function(col) {
stop("oh no")
}
mutate(df, across(y, fn))
#> Error in `mutate()`:
#> ℹ In argument: `across(y, fn)`.
#> Caused by error in `across()`:
#> ! Can't compute column `y`.
#> Caused by error:
#> ! oh no
It can probably just be:
#> Error in `mutate()`:
#> ℹ In argument: `across(y, fn)`.
#> ℹ In column: `y`.
#> Caused by error:
#> ! oh no
As mentioned here #6704 (comment)
Thrown from here, so seems plausible that we could improve on this
Lines 382 to 388 in 49b39af
chunks <- withCallingHandlers( | |
mask$eval_all_mutate(quo), | |
error = function(cnd) { | |
msg <- glue("Can't compute column `{quo_data$name_auto}`.") | |
abort(msg, call = call("across"), parent = cnd) | |
} | |
) |
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement