Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
Bluebird
node v6.17.1
version:
1.0.0
endpoint
share
tweet
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