Created
          April 26, 2017 08:40 
        
      - 
      
 - 
        
Save rishispeets/6cbfa6be7e63979a05b51e3f3d467004 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
Rishi Speets created this gist
Apr 26, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ var fs = require('fs') fs.readFile('/Does/not/exist', handleFile) function handleFile (error, file) { if (error) return console.error('Uhoh, there was an error', error) // otherwise, continue on and use `file` in your code }