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