Created
January 29, 2015 18:45
-
-
Save tdfischer/bd215f7b51d9a2865b13 to your computer and use it in GitHub Desktop.
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
bluebird.promisifyAll(SomeType.prototype); | |
var foo = new SomeType(); | |
foo.doFooAsync().then(function(r) { | |
//SOME COMPUTERING | |
foo.doMoreAsync().then(function(r) { | |
//MORE COMPUTERING | |
}).catch(function(e) { | |
console.log('also halt and catch fire'); | |
}); | |
}).catch(function(e) { | |
console.log('halt and catch fire'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment