Merge pull request #111 from martinheidegger/patch-1
Adding helpful information in case parsing failed.
This commit is contained in:
commit
5502f2cf98
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue