winch_add_trace_back: Enrich an rlang traceback with details on native calls

Description Usage Arguments Examples

View source: R/add_trace_back.R

Description

This function uses the native stack trace returned from winch_trace_back() to add details on native function calls to an rlang traceback object. It is intended to be called by rlang.

Usage

1
winch_add_trace_back(trace = rlang::trace_back(bottom = parent.frame()))

Arguments

trace

An rlang traceback as returned by rlang::trace_back().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
foo <- function() {
  winch_call(bar)
}

bar <- function() {
  trace <- rlang::trace_back()
  winch_add_trace_back(trace)
}

foo()

winch documentation built on Oct. 24, 2021, 5:07 p.m.