Skip to content

Instantly share code, notes, and snippets.

@jgraham909
Last active June 23, 2016 19:34
Show Gist options
  • Save jgraham909/d2596ea59d1fa9a7fe642358cb644546 to your computer and use it in GitHub Desktop.
Save jgraham909/d2596ea59d1fa9a7fe642358cb644546 to your computer and use it in GitHub Desktop.
Javascript Promises. Where errors are silently swallowed with no indication.If you use promises and don't have something like this snippet in your code, good luck!
process.on('unhandledRejection', (reason, promise) => {
console.error('ERROR: Unhandled Rejection: ', reason);
console.dir(promise);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment