From 131fe0c2bc9e3f14c0c06e631135d509c29a7591 Mon Sep 17 00:00:00 2001 From: Borewit Date: Sat, 1 Feb 2020 11:34:09 +0100 Subject: [PATCH] fix(server): Report original error message Display original error message of plugins like: karma-browserstack-launcher, karma-cbt-launcher. Fixes #3414 --- lib/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/server.js b/lib/server.js index 760b2694f..ae1b7ef21 100644 --- a/lib/server.js +++ b/lib/server.js @@ -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) }) }