Skip to content

Commit

Permalink
Merge 131fe0c into 1fc51b0
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit authored Feb 10, 2020
2 parents 1fc51b0 + 131fe0c commit 182616b
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 182616b

Please sign in to comment.