From dddf2ec5b2d2cf7eb11dbb025281381d4ba40f8f Mon Sep 17 00:00:00 2001 From: enahs Date: Mon, 21 Oct 2013 23:38:41 -0700 Subject: [PATCH] More verbose error message for invalid JSON in config.js if you enter an invalid json object such as: ``` { server: "http://foo.com" host: "0.0.0.0" } ``` while configuring, you get errors but are still able to run forever and the message previously was not as indicative of other potential configuration problems. --- core/server/config/loader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/server/config/loader.js b/core/server/config/loader.js index 9b3d250a27..be8befe801 100644 --- a/core/server/config/loader.js +++ b/core/server/config/loader.js @@ -57,7 +57,8 @@ function validateConfigEnvironment() { // Check if we don't even have a config if (!config) { - errors.logError(new Error('Cannot find the configuration for the current NODE_ENV'), "NODE_ENV=" + envVal, 'Ensure your config.js has a section for the current NODE_ENV value'); + errors.logError(new Error('Cannot find the configuration for the current NODE_ENV'), "NODE_ENV=" + envVal, + 'Ensure your config.js has a section for the current NODE_ENV value and is formatted properly.'); return when.reject(); }