cachaito
10/29/2015 - 1:09 PM

Promies .catch()

//Exception in success handler goes unnoticed
promise.then(callback, callback);

//This way exception in the success handler will be propagated to the correct place.
promise
    .then(callback)
    .catch(callback);