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

title: Error traceback with rlang

Using tools that error with rlang should show backtrace in cell output when configured

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


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.