Show more verbose error message on console if the config is malformed

This commit is contained in:
Veeck 2019-03-06 10:01:44 +01:00
parent 331e8c4aa6
commit 02d36e22ee
2 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Updated ### Updated
- Bumped the Electron dependency to v3.0.13 to support the most recent Raspbian. [#1500](https://github.com/MichMich/MagicMirror/issues/1500) - Bumped the Electron dependency to v3.0.13 to support the most recent Raspbian. [#1500](https://github.com/MichMich/MagicMirror/issues/1500)
- Updated modernizr code in alert module, fixed a small typo there too - Updated modernizr code in alert module, fixed a small typo there too
- More verbose error message on console if the config is malformed
### Fixed ### Fixed
- Fixed temperature displays in currentweather and weatherforecast modules [#1503](https://github.com/MichMich/MagicMirror/issues/1503), [#1511](https://github.com/MichMich/MagicMirror/issues/1511). - Fixed temperature displays in currentweather and weatherforecast modules [#1503](https://github.com/MichMich/MagicMirror/issues/1503), [#1511](https://github.com/MichMich/MagicMirror/issues/1511).

View File

@ -70,7 +70,7 @@ var App = function() {
if (e.code == "ENOENT") { if (e.code == "ENOENT") {
console.error(Utils.colors.error("WARNING! Could not find config file. Please create one. Starting with default configuration.")); console.error(Utils.colors.error("WARNING! Could not find config file. Please create one. Starting with default configuration."));
} else if (e instanceof ReferenceError || e instanceof SyntaxError) { } else if (e instanceof ReferenceError || e instanceof SyntaxError) {
console.error(Utils.colors.error("WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration.")); console.error(Utils.colors.error("WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: " + e.stack));
} else { } else {
console.error(Utils.colors.error("WARNING! Could not load config file. Starting with default configuration. Error found: " + e)); console.error(Utils.colors.error("WARNING! Could not load config file. Starting with default configuration. Error found: " + e));
} }