所以,我有以下代码
Q.fcall(foo(input))
.then(
() ->
# do stuff
)
.fail(
# this never gets called
)
foo = (input) ->
throw new Error('catch me!')
我收到以下错误:Uncaught Error: catch me!
。根据{{3}} .fail
调用应该捕获foo
引发的任何错误 - 我做错了什么?
答案 0 :(得分:3)
应为Q.fcall(foo, input)