Skip to content

Instantly share code, notes, and snippets.

@tdfischer
Created January 29, 2015 18:45
Show Gist options
  • Save tdfischer/bd215f7b51d9a2865b13 to your computer and use it in GitHub Desktop.
Save tdfischer/bd215f7b51d9a2865b13 to your computer and use it in GitHub Desktop.
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