summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2012-07-10 21:38:14 +0200
committerMarcel Klehr <mklehr@gmx.net>2012-07-10 21:38:14 +0200
commit885844667887411c8fc2822ab1914b7277bcb4ca (patch)
tree36bfc4b695fd3133c459fa8042578bf55ed194c7 /src
parent4c8f69b7c55f1a8ba8e8d338c2cee6bac0cc85c4 (diff)
downloadetherpad-lite-885844667887411c8fc2822ab1914b7277bcb4ca.zip
Exit on error.
Diffstat (limited to 'src')
-rw-r--r--src/node/utils/Settings.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js
index aeeb9015..68e58eb2 100644
--- a/src/node/utils/Settings.js
+++ b/src/node/utils/Settings.js
@@ -111,7 +111,8 @@ try{
//read the settings sync
settingsStr = fs.readFileSync(settingsFilename);
} catch(e){
- console.warn('No settings file found. Using defaults.');
+ console.error('No settings file found.');
+ process.exit(1);
}
// try to parse the settings
@@ -121,8 +122,8 @@ try {
settings = vm.runInContext('exports = '+settingsStr, vm.createContext(), "settings.json");
}
}catch(e){
- console.warn('There was an error processing your settings.json file. Using defaults.');
- console.warn(e.message);
+ console.error('There was an error processing your settings.json file: '+e.message);
+ process.exit(1);
}
//loop trough the settings
@@ -142,8 +143,7 @@ for(var i in settings)
//this setting is unkown, output a warning and throw it away
else
{
- console.warn("Unkown Setting: '" + i + "'");
- console.warn("This setting doesn't exist or it was removed");
+ console.warn("Unkown Setting: '" + i + "'. This setting doesn't exist or it was removed");
}
}