Error traceback with rlang

If error happens during knit_print(), the traceback shown is a smaller one, starting at knit_print() function internal.

options(rlang_backtrace_on_error_report = "full")
f <- function() g()
g <- function() h()
h <- function() stop("This is an error from knit_print !")

knit_print.custom <- function(x, ...) {
    f()
}
structure("example", class = "custom")


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.