Skip to content

Commit

Permalink
Additional error information when JSON config file cannot be read
Browse files Browse the repository at this point in the history
  • Loading branch information
mfloryan authored and Marcin Floryan committed Apr 29, 2013
1 parent 818526c commit 0135d95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nconf/stores/file.js
Expand Up @@ -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);
Expand Down Expand Up @@ -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 + '].');
}
}

Expand Down

0 comments on commit 0135d95

Please sign in to comment.