File: backtrace.Rd

package info (click to toggle)
r-cran-future 1.11.1.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,380 kB
  • sloc: sh: 14; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 742 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/backtrace.R
\name{backtrace}
\alias{backtrace}
\title{Back trace the expressions evaluated when an error was caught}
\usage{
backtrace(future, envir = parent.frame(), ...)
}
\arguments{
\item{future}{A future with a caught error.}

\item{envir}{the environment where to locate the future.}

\item{\dots}{Not used.}
}
\value{
A @list with the future's call stack that led up to the error.
}
\description{
Back trace the expressions evaluated when an error was caught
}
\examples{
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)
})
}