mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge branch 'colors-error' into check-wrong-configuration
This commit is contained in:
commit
2c0ca78265
@ -68,11 +68,11 @@ var App = function() {
|
|||||||
callback(config);
|
callback(config);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.code == "ENOENT") {
|
if (e.code == "ENOENT") {
|
||||||
console.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("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. Please correct syntax errors. Starting with default configuration."));
|
||||||
} else {
|
} else {
|
||||||
console.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));
|
||||||
}
|
}
|
||||||
callback(defaults);
|
callback(defaults);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,8 @@ var colors = require("colors/safe");
|
|||||||
|
|
||||||
var Utils = {
|
var Utils = {
|
||||||
colors: {
|
colors: {
|
||||||
warn: colors.yellow
|
warn: colors.yellow,
|
||||||
|
error: colors.red
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user