Skip to content

Commit

Permalink
main: Properly inspect unhandledRejection promise
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Mar 23, 2018
1 parent ef63ff7 commit 72f07ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Expand Up @@ -5,6 +5,7 @@ var irc = require('twitch-js')
var _ = require('lodash')
const figlet = require('figlet')
const moment = require('moment')
const util = require('util')

// config
const config = require('./config.json')
Expand Down Expand Up @@ -375,8 +376,7 @@ if (config.debug.all) {
}

process.on('unhandledRejection', function (reason, p) {
global.log.error('Possibly Unhandled Rejection')
global.log.error(p)
global.log.error(`Possibly Unhandled Rejection at: ${util.inspect(p)} reason: ${reason}`)
})

process.on('uncaughtException', () => {
Expand Down

0 comments on commit 72f07ac

Please sign in to comment.