Loading README.md +4 −2 Original line number Original line Diff line number Diff line Loading @@ -231,16 +231,18 @@ rp('http://google.com') .then(null, handleError); .then(null, handleError); // By the way, this: // However, this: rp('http://google.com') rp('http://google.com') .then(process) .then(process) .catch(handleError); .catch(handleError); // ... is equivalent to: // ... is safer than: rp('http://google.com') rp('http://google.com') .then(process, handleError); .then(process, handleError); ``` ``` For more info on `.then(process).catch(handleError)` versus `.then(process, handleError)`, see Bluebird docs on [promise anti-patterns](http://bluebirdjs.com/docs/anti-patterns.html#the-.then). ### .finally(onFinished) ### .finally(onFinished) ``` js ``` js Loading Loading
README.md +4 −2 Original line number Original line Diff line number Diff line Loading @@ -231,16 +231,18 @@ rp('http://google.com') .then(null, handleError); .then(null, handleError); // By the way, this: // However, this: rp('http://google.com') rp('http://google.com') .then(process) .then(process) .catch(handleError); .catch(handleError); // ... is equivalent to: // ... is safer than: rp('http://google.com') rp('http://google.com') .then(process, handleError); .then(process, handleError); ``` ``` For more info on `.then(process).catch(handleError)` versus `.then(process, handleError)`, see Bluebird docs on [promise anti-patterns](http://bluebirdjs.com/docs/anti-patterns.html#the-.then). ### .finally(onFinished) ### .finally(onFinished) ``` js ``` js Loading