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/attempt documentation built on Jan. 12, 2023, 6:50 p.m.