backtrace: Back trace the expressions evaluated when an error was caught

Description Usage Arguments Value Examples

View source: R/backtrace.R

Description

Back trace the expressions evaluated when an error was caught

Usage

1

Arguments

future

A future with a caught error.

envir

the environment where to locate the future.

...

Not used.

Value

A list with the future's call stack that led up to the error.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
my_log <- function(x) log(x)
foo <- function(...) my_log(...)

f <- future({ foo("a") })
res <- tryCatch({
  v <- value(f)
}, error = function(ex) {
  t <- backtrace(f)
  print(t)
})

future documentation built on Jan. 8, 2021, 5:36 p.m.

Related to backtrace in future...