Merge pull request #111 from martinheidegger/patch-1

Adding helpful information in case parsing failed.
This commit is contained in:
Charlie Robbins 2014-11-26 01:08:02 -05:00
commit 5502f2cf98

View file

@ -105,7 +105,7 @@ File.prototype.load = function (callback) {
}
catch (ex) {
return callback(new Error("Error parsing your JSON configuration file: [" + self.file + '].'));
return callback(new Error("Error parsing your configuration file: [" + self.file + ']: ' + ex.message));
}
callback(null, self.store);
@ -138,7 +138,7 @@ File.prototype.loadSync = function () {
this.store = data;
}
catch (ex) {
throw new Error("Error parsing your JSON configuration file: [" + self.file + '].');
throw new Error("Error parsing your configuration file: [" + self.file + ']: ' + ex.message);
}
}