Bug fixed

This commit is contained in:
Luis Fernando Molina committed 2020-12-27 11:59:38 +01:00
1 parent 55a63d9c88
commit 140f53f181
3 files changed
+60 -16

No files matched your search

+2 -1
View File
@@ -5,12 +5,13 @@ let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
global.env = ENVIRONMENT_MODULE
process.on('uncaughtException', function (err) {
if (err.message.indexOf("EADDRINUSE") > 0) {
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
console.log("A Superalgos Client cannot be started. Reason: the port " + port + " is already in use by another application.")
return
}
console.log('[ERROR] Client -> client-> uncaughtException -> err.message = ' + err.message)
console.log('[ERROR] Client -> client-> uncaughtException -> err.stack = ' + err.stack)
console.log('[ERROR] Client -> client-> uncaughtException -> err = ' + err)
process.exit(1)
})