tests/testthat/fixtures/error-show-messages.R

options(
  crayon.enabled = FALSE,
  cli.unicode = FALSE
)

opt <- Sys.getenv("show_error_messages")
if (nzchar(opt)) {
  options(show.error.messages = as.logical(opt))
}

rlang::abort("Oh no")

Try the rlang package in your browser

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

rlang documentation built on Nov. 4, 2023, 9:06 a.m.