Question

So, I have the following code

Q.fcall(foo(input))
.then(
  () ->
    # do stuff
)
.fail(
  # this never gets called
)

foo = (input) ->
  throw new Error('catch me!')

And I get the following error: Uncaught Error: catch me!. Per the docs The .fail call should catch any errors thrown by foo - Am I doing something wrong?

Was it helpful?

Solution

It should be Q.fcall(foo, input)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top