Skip to content
Snippets Groups Projects
Commit d1e9c348 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

don't write an error to console if run.js for the particular server doesn't exist (not an error)

parent 05e047a0
No related branches found
No related tags found
No related merge requests found
......@@ -132,10 +132,13 @@ dirs.forEach(function(dirObj) {
var handlerPath = path.join(dirObj.path, "server", "run.js");
var handler = undefined;
try {
fs.statSync(handlerPath).isFile();
handler = require(handlerPath).handler;
var runJSExists = false;
try { runJSExists = fs.statSync(handlerPath).isFile() } catch(e) {};
if (runJSExists) {
handler = require(handlerPath).handler;
}
} catch(e) {
console.log("Error starting up " + dirObj + ": " + e);
console.log("Error loading " + handlerPath + ": " + e);
}
var so = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment