Skip to content

Commit

Permalink
Improve error message if settings file fails to load
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Sep 26, 2015
1 parent 3c549c6 commit 18836b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion red.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 18836b5

Please sign in to comment.