tests/testthat/ressources/with-stop-error-wch.R

testthat::local_reproducible_output()
withCallingHandlers(
  error = function(cnd) rlang::entrace(cnd),
  evaluate::evaluate(function() {
    f <- function() g()
    g <- function() h()
    h <- function() stop("!")
    f()
  }, stop_on_error = 2L)
)

Try the evaluate package in your browser

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

evaluate documentation built on April 4, 2025, 2:34 a.m.