rstudio / promises

A promise library for R
https://rstudio.github.io/promises
Other
201 stars 19 forks source link

Need more helpful error message when rhs function is not wrapped in parens #3

Closed wch closed 6 years ago

wch commented 6 years ago

For example:

promises::promise(function(resolve, reject) {
  resolve(1)
}) %...>% function(x) {
  print(x)
}
#> Unhandled promise error: invalid formal argument list for "function"

It would be nice if this had a more helpful error message -- or if it could just work.