Skip to content

Commit

Permalink
Merge ec854a2 into 1fc51b0
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit authored Feb 10, 2020
2 parents 1fc51b0 + ec854a2 commit dd46bc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,18 +389,18 @@ class Server extends KarmaEventEmitter {
processWrapper.on('SIGTERM', disconnectBrowsers)

const reportError = (error) => {
process.emit('infrastructure_error', error)
process.emit(`infrastructure_error: ${error.message || String(error)}`
disconnectBrowsers(1)
this.log.error(error)
}

processWrapper.on('unhandledRejection', (error) => {
this.log.error('UnhandledRejection')
this.log.error(`UnhandledRejection: ${error.message || String(error)}`)
reportError(error)
})

processWrapper.on('uncaughtException', (error) => {
this.log.error('UncaughtException')
this.log.error(`UncaughtException:: ${error.message || String(error)}`)
reportError(error)
})
}
Expand Down

0 comments on commit dd46bc0

Please sign in to comment.