R/errno.R

Defines functions errno

Documented in errno

#' List of 'errno' error codes
#'
#' For the errors that are not used on the current platform, `value` is
#' `NA_integer_`.
#'
#' A data frame with columns: `name`, `value`, `description`.
#' @export
#' @examplesIf ps::ps_is_supported() && ! ps:::is_cran_check()
#' errno()

errno <- function() {
  err <- as.list(ps_env$constants$errno)
  err <- err[order(names(err))]
  data_frame(
    name = names(err),
    value = vapply(err, "[[", integer(1), 1),
    description = vapply(err, "[[", character(1), 2)
  )
}

Try the ps package in your browser

Any scripts or data that you put into this service are public.

ps documentation built on April 19, 2023, 1:08 a.m.