packrat/lib/x86_64-w64-mingw32/3.6.1/rlang/tests/testthat/fixtures/error-backtrace-parent.R

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

if (nzchar(Sys.getenv("rlang_interactive"))) {
  options(rlang_interactive = TRUE)
}
options(rlang_trace_format_srcrefs = FALSE)

f <- function() g()
g <- function() h()
h <- function() rlang::abort("foo")

a <- function() b()
b <- function() c()
c <- function() {
  tryCatch(
    f(),
    error = function(err) rlang::abort("bar", parent = err)
  )
}

a()
jmcascalheira/LGMIberiaCluster documentation built on June 8, 2021, 10 a.m.