Open alexpghayes opened 1 year ago
library(purrr) library(furrr) #> Loading required package: future plan(multisession, workers = 20) fails_at_index <- function(index, failure_index = 100) { if (index == failure_index) { stop("Grompy") } "Happy" } # helpful error message map(1:200, fails_at_index) #> Error in `map()`: #> ℹ In index: 100. #> Caused by error in `.f()`: #> ! Grompy # misleading error message future_map(1:200, fails_at_index) #> Error: #> ℹ In index: 10. #> Caused by error in `...furrr_fn()`: #> ! Grompy
Created on 2023-02-15 with reprex v2.0.2.9000
Created on 2023-02-15 with reprex v2.0.2.9000