@ -262,8 +262,15 @@ var fs = require('fs'),
async.each(languages, function(pathToLang, next) {
fs.readFile(pathToLang, function(err, file) {
try {
var json = JSON.parse(file.toString());
} catch (err) {
winston.error('[plugins] Unable to parse custom language file: ' + pathToLang + '\r\n' + err.stack);
return next(err);
}
arr.push({
file: JSON.parse(file.toString()),
file: json,
route: pathToLang.replace(pathToFolder, '')
});