Additional error information when JSON config file cannot be read
This commit is contained in:
parent
818526ca62
commit
0135d95a06
1 changed files with 2 additions and 2 deletions
|
@ -100,7 +100,7 @@ File.prototype.load = function (callback) {
|
|||
self.store = self.format.parse(data.toString());
|
||||
}
|
||||
catch (ex) {
|
||||
return callback(new Error("Error parsing your JSON configuration file."));
|
||||
return callback(new Error("Error parsing your JSON configuration file: [" + self.file + '].'));
|
||||
}
|
||||
|
||||
callback(null, self.store);
|
||||
|
@ -129,7 +129,7 @@ File.prototype.loadSync = function () {
|
|||
this.store = data;
|
||||
}
|
||||
catch (ex) {
|
||||
throw new Error("Error parsing your JSON configuration file.")
|
||||
throw new Error("Error parsing your JSON configuration file: [" + self.file + '].');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue