Better error display for "npm run" and config.json

This commit is contained in:
Nick Farina
2015-08-20 21:38:29 -07:00
parent 5f1df2792f
commit 64c665cebb
2 changed files with 5 additions and 3 deletions

6
app.js
View File

@@ -34,8 +34,10 @@ try {
config = JSON.parse(fs.readFileSync(configPath));
}
catch (err) {
console.log("There was a problem reading your config.json file:\n\n" + err.stack);
process.exit(0);
console.log("There was a problem reading your config.json file.");
console.log("Please try pasting your config.json file here to validate it: http://jsonlint.com");
console.log("");
throw err;
}
// pull out our custom Bridge settings from config.json, if any