src/library/pkgcache/R/errors2.R

new_pkgcache_cond <- function(..., call. = FALSE, class = NULL, data = NULL) {
  cnd <- new_cond(..., call. = call.)
  cnd[names(data)] <- data
  class(cnd) <- c(class, "pkgcache_condition", class(cnd))
  cnd
}

new_pkgcache_warning <- function(..., call. = FALSE, class = NULL, data = NULL) {
  cnd <- new_cond(..., call. = call.)
  cnd[names(data)] <- data
  class(cnd) <- c(class, "pkgcache_condition", "warning", class(cnd))
  cnd
}
r-lib/pak documentation built on Nov. 9, 2024, 2:34 a.m.