Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error indices from purrr() are misleading in furrr() #250

Open
alexpghayes opened this issue Feb 15, 2023 · 0 comments
Open

Error indices from purrr() are misleading in furrr() #250

alexpghayes opened this issue Feb 15, 2023 · 0 comments

Comments

@alexpghayes
Copy link

alexpghayes commented Feb 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant