use console.error on EADDRINUSE

This commit is contained in:
Florent Vilmart
2016-03-28 21:57:22 -04:00
parent 5c1fe3a325
commit 247a06f399

View File

@@ -263,7 +263,7 @@ class ParseServer {
if (!process.env.TESTING) {
process.on('uncaughtException', (err) => {
if ( err.code === "EADDRINUSE" ) { // user-friendly message for this common error
log.error(`Unable to listen on port ${err.port}. The port is already in use.`);
console.error(`Unable to listen on port ${err.port}. The port is already in use.`);
process.exit(0);
} else {
throw err;