Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Promise = require('bluebird');
- var rejection = Promise.reject('boo');
- asyncStuff().then(function() {
- rejection.catch(function(err) {
- console.log('meh');
- });
- });
- function asyncStuff() {
- return new Promise(function(resolve, reject) {
- setTimeout(resolve);
- });
- }
- // Possibly unhandled Error: boo
- // at Function.Promise.reject.Promise.rejected (./node_modules/bluebird/js/main/promise.js:274:21)
- // at Object.<anonymous> (./argh.js:3:25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement