unhandledRejection support?
now that node people decided to have a whooooole separate means of async i/o failure, i want to catch those too. care if we rev this to add an unhandledRejection handler too?
👍 running into the same issue.
Here's the very thorough one we've done for our app. Maybe something similar can live here:
process.on('unhandledRejection', (reason, p) => {
console.error(new Date().toUTCString(), 'unhandledRejection')
if (reason && reason.stack) {
console.error(reason.stack)
} else if (reason) {
console.error('No stack trace found.')
console.error('Reason: ', reason)
} else {
console.error('No reason given to the unhandled rejection promise')
console.error(p)
}
process.exit(1)
})
I wrote the package perish to address it
On Jul 29, 2016 10:33 AM, "Jamund Ferguson" [email protected] wrote:
Here's the very thorough one we've done for our app. Maybe something similar can live here:
process.on('unhandledRejection', (reason, p) => { console.error(new Date().toUTCString(), 'unhandledRejection') if (reason && reason.stack) { console.error(reason.stack) } else if (reason) { console.error('No stack trace found.') console.error('Reason: ', reason) } else { console.error('No reason given to the unhandled rejection promise') console.error(p) } process.exit(1) })
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/krakenjs/endgame/issues/3#issuecomment-236243042, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9O_R6uSotT8negtP6iqNID0gX2mAZdks5qajlJgaJpZM4ImEtM .