Created
June 3, 2014 14:50
-
-
Save rkaw92/a10d705b9d4bcebd550b to your computer and use it in GitHub Desktop.
How to break when.js rejection handler detection
This file contains 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 when1 = require('when1'); | |
var when2 = require('when2'); | |
var rejectedPromise = when1.reject(new Error('Intentional failure')); | |
when2(rejectedPromise).done(undefined, function(error){ | |
console.log('Rejection properly handled:', error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment