Skip to content

Commit

Permalink
Printout entire error trace when unhandledRejection was caught (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
xinbenlv authored and huan committed Mar 26, 2017
1 parent e7a3059 commit 2f18936
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ process.on('unhandledRejection', (reason, promise) => {
log.error('Config', 'unhandledRejection: %s %s', reason, promise)
log.error('Config', '###########################')
promise.catch(err => {
log.error('Config', 'unhandledRejection::catch(%s)', err.message || err)
log.error('Config', 'unhandledRejection::catch(%s)', err.message)
console.error('Config', err); // I don't know if log.error has similar full trace print support like console.error
})
})
*/

0 comments on commit 2f18936

Please sign in to comment.