diff --git a/core/bbs.js b/core/bbs.js index 86134c38..4436eb02 100644 --- a/core/bbs.js +++ b/core/bbs.js @@ -75,10 +75,10 @@ function main() { configPathSupplied = null; // make non-fatal; we'll go with defaults } } else { - console.error(err.toString()); + console.error(err.message); } } - callback(err); + return callback(err); }); }, function initSystem(callback) { @@ -91,14 +91,16 @@ function main() { } ], function complete(err) { - // note this is escaped: - fs.readFile(paths.join(__dirname, '../misc/startup_banner.asc'), 'utf8', (err, banner) => { - console.info(FULL_COPYRIGHT); - if(!err) { - console.info(banner); - } - console.info('System started!'); - }); + if(!err) { + // note this is escaped: + fs.readFile(paths.join(__dirname, '../misc/startup_banner.asc'), 'utf8', (err, banner) => { + console.info(FULL_COPYRIGHT); + if(!err) { + console.info(banner); + } + console.info('System started!'); + }); + } if(err) { console.error('Error initializing: ' + util.inspect(err)); diff --git a/core/config.js b/core/config.js index 92016731..6d5251a3 100644 --- a/core/config.js +++ b/core/config.js @@ -100,6 +100,8 @@ function init(configPath, options, cb) { Events.emit(Events.getSystemEvents().ConfigChanged); } }); + } else { + console.stdout(`Configuration ${reCachedPath} is invalid: ${err.message}`); // eslint-disable-line no-console } }); };