R/utils.R

Defines functions try_catch_df_builder try_catch_builder

#' @importFrom rlang call2

try_catch_builder <- function(arg, fun, ...) {
  a <- call2(
    fun,
    !!!(list(arg))
  )
  call2(
    "try_catch",
    !!!(list(expr = a, ...))
  )
}

try_catch_df_builder <- function(arg, fun, ...) {
  a <- call2(
    fun,
    !!!(list(arg))
  )
  call2(
    "try_catch_df",
    !!!(list(expr = a, ...))
  )
}
ColinFay/trycatchthis documentation built on Dec. 31, 2022, 3:59 a.m.