tests/testthat/examples/knitr-examples/127-rlang-error.md

title: Error traceback with rlang

When error = TRUE is used, the traceback is shown in cell output if rlang is configured.

options(rlang_backtrace_on_error_report = "full")
f <- function() g()
g <- function() h()
h <- function() stop("This is an error !")
f()
## Error in `h()`:
## ! This is an error !
## Backtrace:
##     ▆
##  1. └─global f()
##  2.   └─global g()
##  3.     └─global h()


Try the parsermd package in your browser

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

parsermd documentation built on Aug. 21, 2025, 5:27 p.m.