Commit cafb195b5c864a0f25ef74fd9f5a53afe6aff9c3

Authored by Eric Fernandez
1 parent f5a4882603
Exists in master

catch err on readFile

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
... ... @@ -12,6 +12,11 @@ module.exports = function (dir, callback) {
12 12  
13 13 fs.readFile(file, 'utf8', function (err, fileString) {
14 14  
  15 + if (err) {
  16 + console.log('ERROR', err);
  17 + return;
  18 + }
  19 +
15 20 callback(fileString, file);
16 21 });
17 22 }