Last active
December 10, 2016 09:41
-
-
Save bendrucker/1c41136d839dea69675a to your computer and use it in GitHub Desktop.
Bluebird's possibly unhandled behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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