-
-
Save stefanpenner/587e5f047d2f412fe463 to your computer and use it in GitHub Desktop.
log all errors that are not immediately handled in promises
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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