R/is_class.R

Defines functions is_try_error

Documented in is_try_error

#' Is the element of class "try-error"?
#'
#' @param .x the object to test
#'
#' @return A logical
#' @export
#'
#' @examples
#' x <- attempt(log("a"), silent = TRUE)
#' is_try_error(x)
#'
is_try_error <- function(.x) {
  inherits(.x, "try-error")
}
ColinFay/attempt documentation built on Jan. 12, 2023, 6:50 p.m.