主要区别就是,如果在 then 的第一个函数里抛出了异常,后面的 catch 能捕获到,而第二个函数捕获不到
p.then(function () { throw new Error() }, function () { // won't capture this error }) .catch(function () { // will capture the error })