Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@stefanpenner
Last active December 23, 2015 11:09
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanpenner/587e5f047d2f412fe463 to your computer and use it in GitHub Desktop.
Save stefanpenner/587e5f047d2f412fe463 to your computer and use it in GitHub Desktop.
log all errors that are not immediately handled in promises
Ember.RSVP.on('error', function(error) {
// optionally, only for errors
// if (error instanceof Error) { console.assert(false, error); }
console.assert(false, error);
if (error && error.stack) {
// console.error provides clickable stack-traces in chrome debugger
console.error(error.stack);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment