下面给出1-3:
var a = $.Deferred()
a.done(function(){throw Error()});
a.resolve() // Uncaught error
现在假设调用堆栈被清除。然后我做以下事情:
a.done(function(){console.log('Done')})
a.fail(function(){console.log('Fail')})
a.then(function(){console.log('Then')})
没有任何反应。为什么?为什么(3)中未被捕获的错误会阻止进一步的回调被解雇?这是设计吗?