I was thinking of this pattern:
a1 <- tryCatch(dplyr::select(mtcars, bm),
error = function(e) e)
(a2 <- rlang::cnd_message(a1))
[1] "Can't subset columns that don't exist.\n\033[31mx\033[39m Column `bm` doesn't exist."
I was thinking of this pattern:
a1 <- tryCatch(dplyr::select(mtcars, bm),
error = function(e) e)
(a2 <- rlang::cnd_message(a1))
[1] "Can't subset columns that don't exist.\n\033[31mx\033[39m Column `bm` doesn't exist."