Bluebird

node v6.17.1
version: 1.0.0
endpointsharetweet
const Promise = require('bluebird'); await Promise.resolve() .then(() => { throw new Error('oopsie'); }) .finally((results) => { console.log('results:', results); }) .catch((e) => 'eat the error') .then(() => 'poopsie');
try { await Promise.resolve() .then(() => { throw new Error('oopsie'); }) .finally((results) => { console.log('results:', results); }) .then(() => 'poopsie'); } catch (e) { console.log('e:', e); }
await Promise.resolve() .then(() => { throw new Error('oopsie'); }) .catch((e) => e) .then((results) => results + ' poopsie');
Loading…

no comments

    sign in to comment