Merge pull request #6 from dominictarr/master

callback inside of try block can obscure errors
This commit is contained in:
Charlie Robbins 2011-06-12 16:38:17 -07:00
commit d8627a9475

View file

@ -97,12 +97,13 @@ File.prototype.load = function (callback) {
try { try {
self.store = self.format.parse(data.toString()); self.store = self.format.parse(data.toString());
callback(null, self.store);
} }
catch (ex) { catch (ex) {
self.store = {}; self.store = {};
callback(ex); return callback(ex);
} }
callback(null, self.store);
}); });
}; };