Skip to content

Commit

Permalink
Logs errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ncrohn committed Jun 29, 2012
1 parent c4b81e7 commit 2dff4f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/filesystem.js
Expand Up @@ -27,15 +27,15 @@ fileSystem.getFile = function(filePath, callback) {
function getCachedFile() {
fs.readFile(cacheFile, "utf-8",
function(err, data) {
if(err) throw err;
if(err) winston.log('error', err);
callback(data, true);
});
}

function getOriginalFile() {
fs.readFile(filePath, "utf-8",
function(err, data) {
if(err) throw err;
if(err) winston.log('error', err);
callback(data, false);
});
}
Expand Down Expand Up @@ -84,7 +84,7 @@ fileSystem.writeFile = function(filePath, data, callback) {

fs.writeFile(cacheFile, data, "utf-8",
function(err) {
if(err) throw err;
if(err) winston.log('error', err);
callback();
});
};

0 comments on commit 2dff4f3

Please sign in to comment.