Merge pull request #111 from martinheidegger/patch-1

Adding helpful information in case parsing failed.
master
Charlie Robbins 2014-11-26 01:08:02 -05:00
commit 5502f2cf98
1 changed files with 2 additions and 2 deletions

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);
}
}