Skip to content

Instantly share code, notes, and snippets.

@craigp
Created April 20, 2015 14:54
Show Gist options
  • Save craigp/5bd4165d7671e7f0f1f3 to your computer and use it in GitHub Desktop.
Save craigp/5bd4165d7671e7f0f1f3 to your computer and use it in GitHub Desktop.
var Q = require('q');
Q("stuff")
.then(function(result) {
Q(result)
.then(function(result2) {
throw new Error("omfg");
})
.catch(function(err) {
console.log("err2", err);
throw err;
});
})
.catch(function(err) {
console.log("err1", err); // never gets here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment