mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Improve error message if settings file fails to load
This commit is contained in:
parent
ee37464741
commit
5f9780d71c
5
red.js
5
red.js
@ -100,8 +100,11 @@ try {
|
||||
var settings = require(settingsFile);
|
||||
settings.settingsFile = settingsFile;
|
||||
} catch(err) {
|
||||
console.log("Error loading settings file: "+settingsFile)
|
||||
if (err.code == 'MODULE_NOT_FOUND') {
|
||||
console.log("Unable to load settings file: "+settingsFile);
|
||||
if (err.toString().indexOf(settingsFile) === -1) {
|
||||
console.log(err.toString());
|
||||
}
|
||||
} else {
|
||||
console.log(err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user