1

Given 1-3 below:

  1. var a = $.Deferred()
  2. a.done(function(){throw Error()});
  3. a.resolve() // Uncaught error

Now assume the call stack is cleared. Then I do the following:

  1. a.done(function(){console.log('Done')})
  2. a.fail(function(){console.log('Fail')})
  3. a.then(function(){console.log('Then')})

And nothing happens. Why? Why does the uncaught error in (3) preclude futher callbacks from firing? Is this by design?

Andre Gregori
  • 1,150
  • 1
  • 10
  • 17

0 Answers0