Skip to content

Instantly share code, notes, and snippets.

@bendrucker
Last active December 10, 2016 09:41
Show Gist options
  • Select an option

  • Save bendrucker/1c41136d839dea69675a to your computer and use it in GitHub Desktop.

Select an option

Save bendrucker/1c41136d839dea69675a to your computer and use it in GitHub Desktop.
Bluebird's possibly unhandled behavior
var Promise = require('bluebird');
var promise1 = new Promise(function (resolve, reject) {
reject(new Error('I will be flagged as possibly unhandled'));
});
var promise2 = new Promise(function (resolve, reject) {
reject(new Error('I will not be flagged'));
});
setImmediate(function () {
promise1.catch(function (err) {
console.log('Caught:', err);
});
});
promise2.catch(function (err) {
console.log('Caught:', err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment