mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-03 08:22:02 +02:00
Handle bad config.hjson at startup/re-cache: output to stderr
This commit is contained in:
parent
a9e2551ae5
commit
f4afe9847d
2 changed files with 14 additions and 10 deletions
22
core/bbs.js
22
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue