Skip to content

Instantly share code, notes, and snippets.

@adriancooney
Created August 3, 2017 15:34
Show Gist options
  • Select an option

  • Save adriancooney/716bba7dd1a77fe8f88e947915189b0d to your computer and use it in GitHub Desktop.

Select an option

Save adriancooney/716bba7dd1a77fe8f88e947915189b0d to your computer and use it in GitHub Desktop.
process.on("unhandledRejection", function(reason, p) {
console.log(reason, p);
console.log("Rejection handled")
new Promise(function(resolve, reject) {
console.log("Second rejection")
reject(new Error("Foo"));
});
});
console.log("First rejection")
Promise.reject()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment