From 0ce4b64c02b4f3979edd99378cea37fae52e72c9 Mon Sep 17 00:00:00 2001 From: Onur Eren Hanife Date: Wed, 17 Jan 2024 11:19:33 +0300 Subject: [PATCH] #8695 re-throwing avoided on parseserver --- src/ParseServer.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ParseServer.js b/src/ParseServer.js index 91d151b3f9..880c5f84aa 100644 --- a/src/ParseServer.js +++ b/src/ParseServer.js @@ -244,7 +244,15 @@ class ParseServer { process.stderr.write(`Unable to listen on port ${err.port}. The port is already in use.`); process.exit(0); } else { - throw err; + if (err.message) { + process.stderr.write('An uncaught exception occurred: ' + err.message); + } + if (err.stack) { + process.stderr.write('Stack Trace:\n' + err.stack); + } else { + process.stderr.write(err); + } + process.exit(1); } }); // verify the server url after a 'mount' event is received